Forgot to account for code shuffling with player.dat fixes.

This commit is contained in:
EvilSeph 2011-06-17 08:59:03 -04:00
parent 39332e5c87
commit 105cc5393c

View File

@ -980,18 +980,18 @@ public abstract class Entity {
// CraftBukkit end // CraftBukkit end
// CraftBukkit Start - reset world // CraftBukkit Start - reset world
org.bukkit.World world = null; CraftWorld world = null;
if (this instanceof EntityPlayer) { if (this instanceof EntityPlayer) {
EntityPlayer entityPlayer = (EntityPlayer) this; EntityPlayer entityPlayer = (EntityPlayer) this;
String worldName = nbttagcompound.getString("World"); String worldName = nbttagcompound.getString("World");
if (worldName == "") { if (worldName == "") {
world = (org.bukkit.World) ((CraftServer) Bukkit.getServer()).getServer().a(entityPlayer.dimension); world = ((CraftServer) Bukkit.getServer()).getServer().a(entityPlayer.dimension).getWorld();
} else { } else {
world = Bukkit.getServer().getWorld(worldName); world = (CraftWorld) Bukkit.getServer().getWorld(worldName);
} }
} }
a(world == null ? null : ((CraftWorld) world).getHandle()); a(world == null ? null : world.getHandle());
// CraftBukkit End // CraftBukkit End
} }