diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-06-05 12:38:56 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-05 12:38:56 -0400 |
commit | 891dfbcef8c98faec837fc7f3fa31eac5505b6f9 (patch) | |
tree | 41b9d0bd9e690b3994a1c95c8f2b93ec2baa9987 /src/main/java/org | |
parent | 7499e2e0dfb5c836678e5a4335ccde314f5ed0ed (diff) | |
download | craftbukkit-891dfbcef8c98faec837fc7f3fa31eac5505b6f9.tar craftbukkit-891dfbcef8c98faec837fc7f3fa31eac5505b6f9.tar.gz craftbukkit-891dfbcef8c98faec837fc7f3fa31eac5505b6f9.tar.lz craftbukkit-891dfbcef8c98faec837fc7f3fa31eac5505b6f9.tar.xz craftbukkit-891dfbcef8c98faec837fc7f3fa31eac5505b6f9.zip |
Possible fix for some chunk loading issues experienced when teleporting. Thanks akrieger!
Diffstat (limited to 'src/main/java/org')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index eded0b31..4d6fe88c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -170,11 +170,12 @@ 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) { + if (oldWorld != newWorld && successfulTeleport) { this.entity = manager.a(entity, newWorld.dimension, false); } - return entity.netServerHandler.teleport(location); + return successfulTeleport; } public void setSneaking(boolean sneak) { |