Portal changes.

By: Tahg <tahgtahv@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-06-08 13:40:40 -04:00
parent 6d2aad732e
commit e48a127bc2

View file

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