From d661c67a7042970785132138673320ea1de3f343 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Sat, 2 Feb 2013 12:34:14 +0000 Subject: [PATCH] Always use the set exit location for portal events. Fixes BUKKIT-3555. --- src/main/java/net/minecraft/server/Entity.java | 2 +- src/main/java/net/minecraft/server/PlayerList.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 26b7a1f34c..87efe2cb1f 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -1771,7 +1771,7 @@ public abstract class Entity { if (event.isCancelled() || event.getTo() == null || !this.isAlive()) { return; } - exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(exit) : event.getTo(); + exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo(); this.teleportTo(exit, true); } } diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java index e9f6a6bd9a..0ad5c43b89 100644 --- a/src/main/java/net/minecraft/server/PlayerList.java +++ b/src/main/java/net/minecraft/server/PlayerList.java @@ -459,7 +459,7 @@ public abstract class PlayerList { return; } - exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(exit) : event.getTo(); + exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo(); exitWorld = ((CraftWorld) exit.getWorld()).getHandle(); Vector velocity = entityplayer.getBukkitEntity().getVelocity();