diff options
Diffstat (limited to 'Spigot-Server-Patches/0167-SPIGOT-1124-Changed-To-Location-on-Teleport-event-ig.patch')
-rw-r--r-- | Spigot-Server-Patches/0167-SPIGOT-1124-Changed-To-Location-on-Teleport-event-ig.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0167-SPIGOT-1124-Changed-To-Location-on-Teleport-event-ig.patch b/Spigot-Server-Patches/0167-SPIGOT-1124-Changed-To-Location-on-Teleport-event-ig.patch new file mode 100644 index 0000000000..ed69dc9c21 --- /dev/null +++ b/Spigot-Server-Patches/0167-SPIGOT-1124-Changed-To-Location-on-Teleport-event-ig.patch @@ -0,0 +1,22 @@ +From 0cb35fe76a8bd74a6f5c029cf8d4632bd5f1cd82 Mon Sep 17 00:00:00 2001 +From: md_5 <[email protected]> +Date: Sat, 11 Jun 2016 22:36:12 -0500 +Subject: [PATCH] SPIGOT-1124: Changed To-Location on Teleport event ignored + + +diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java +index cf27086..16db36e 100644 +--- a/src/main/java/net/minecraft/server/PlayerConnection.java ++++ b/src/main/java/net/minecraft/server/PlayerConnection.java +@@ -682,7 +682,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { + PlayerTeleportEvent event = new PlayerTeleportEvent(player, from.clone(), to.clone(), PlayerTeleportEvent.TeleportCause.UNKNOWN); + this.server.getPluginManager().callEvent(event); + +- if (event.isCancelled() || to.equals(event.getTo())) { ++ if (event.isCancelled() || !to.equals(event.getTo())) { + set.clear(); // Can't relative teleport + to = event.isCancelled() ? event.getFrom() : event.getTo(); + d0 = to.getX(); +-- +2.8.3 + |