Possible Player.dat fixes to address issues with switching between Vanilla and Bukkit or vice versa.

This commit is contained in:
Rigby authored and EvilSeph committed 2011-06-17 01:00:19 -04:00
1 parent 7aadc3d666
commit 0c56bfb62f
2 files changed
+18 -2

No files matched your search

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