diff --git a/paper-server/nms-patches/net/minecraft/server/network/PlayerConnection.patch b/paper-server/nms-patches/net/minecraft/server/network/PlayerConnection.patch index 5373c1dec4..998c286cc8 100644 --- a/paper-server/nms-patches/net/minecraft/server/network/PlayerConnection.patch +++ b/paper-server/nms-patches/net/minecraft/server/network/PlayerConnection.patch @@ -566,7 +566,7 @@ + // SPIGOT-5171: Triggered on join + if (from.equals(to)) { + this.internalTeleport(d0, d1, d2, f, f1, set); -+ return false; // CraftBukkit - Return event status ++ return true; // CraftBukkit - Return event status + } + + PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), cause); @@ -583,7 +583,7 @@ + } + + this.internalTeleport(d0, d1, d2, f, f1, set); -+ return event.isCancelled(); // CraftBukkit - Return event status ++ return !event.isCancelled(); // CraftBukkit - Return event status + } + + public void teleport(Location dest) { diff --git a/paper-server/nms-patches/net/minecraft/world/entity/EntityLiving.patch b/paper-server/nms-patches/net/minecraft/world/entity/EntityLiving.patch index fb794de497..63d030a940 100644 --- a/paper-server/nms-patches/net/minecraft/world/entity/EntityLiving.patch +++ b/paper-server/nms-patches/net/minecraft/world/entity/EntityLiving.patch @@ -1062,7 +1062,7 @@ + } + } else { + // player teleport event is called in the underlining code -+ if (((EntityPlayer) this).connection.teleport(d0, d6, d2, this.getYRot(), this.getXRot(), java.util.Collections.emptySet(), cause)) { ++ if (!((EntityPlayer) this).connection.teleport(d0, d6, d2, this.getYRot(), this.getXRot(), java.util.Collections.emptySet(), cause)) { + return Optional.empty(); + } + }