Possible fix for some chunk loading issues experienced when teleporting. Thanks akrieger!

By: EvilSeph <evilseph@unaligned.org>
This commit is contained in:
CraftBukkit/Spigot 2011-06-05 12:38:56 -04:00
parent 88299f417b
commit f9895d3ca5

View file

@ -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) {