Always use the set exit location for portal events. Fixes BUKKIT-3555.

This commit is contained in:
James Clarke 2013-02-02 12:34:14 +00:00 committed by feildmaster
parent 94da64ee93
commit d661c67a70
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}
}

View File

@ -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();