From e48a127bc206a8df1b53ef357d6369eb6e770f63 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 8 Jun 2011 13:40:40 -0400 Subject: [PATCH] Portal changes. By: Tahg --- .../java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 4d6fe88c55..a9084f9f66 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -170,12 +170,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { WorldServer newWorld = ((CraftWorld)location.getWorld()).getHandle(); ServerConfigurationManager manager = server.getHandle(); EntityPlayer entity = getHandle(); - boolean successfulTeleport = entity.netServerHandler.teleport(location); - if (oldWorld != newWorld && successfulTeleport) { - this.entity = manager.a(entity, newWorld.dimension, false); + if (oldWorld != newWorld) { + manager.a(entity, newWorld.dimension, location); + return true; //best guess + } else { + return entity.netServerHandler.teleport(location); } - return successfulTeleport; } public void setSneaking(boolean sneak) {