mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-13 03:05:52 -07:00
Possible Player.dat fixes to address issues with switching between Vanilla and Bukkit or vice versa.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user