SPIGOT-7291: Fix spurious invert in ender pearl disconnect check

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2023-03-15 04:14:08 +11:00
parent 40076782ed
commit 71f7114fdb

View file

@ -29,7 +29,7 @@
+ PlayerTeleportEvent teleEvent = new PlayerTeleportEvent(player, player.getLocation(), location, PlayerTeleportEvent.TeleportCause.ENDER_PEARL);
+ Bukkit.getPluginManager().callEvent(teleEvent);
+
+ if (!teleEvent.isCancelled() && !entityplayer.connection.isAcceptingMessages()) {
+ if (!teleEvent.isCancelled() && entityplayer.connection.isAcceptingMessages()) {
+ if (this.random.nextFloat() < 0.05F && this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) {
+ EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.create(this.level);
+