From a98f4f89348196abdbaa2a55a2b450bbbbe257f5 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Fri, 10 Jun 2011 05:45:17 -0400 Subject: [PATCH] Fixed not being able to login if the world saved in your player.dat no longer exists. Thanks for the help Rigby and Verrier! --- src/main/java/net/minecraft/server/Entity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index c18d00bbd2..16fc9ebecf 100644 --- a/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java @@ -916,8 +916,6 @@ public abstract class Entity { } public void e(NBTTagCompound nbttagcompound) { - // CraftBukkit - reset world - a(((CraftWorld)Bukkit.getServer().getWorld(nbttagcompound.getString("World"))).getHandle()); NBTTagList nbttaglist = nbttagcompound.l("Pos"); NBTTagList nbttaglist1 = nbttagcompound.l("Motion"); NBTTagList nbttaglist2 = nbttagcompound.l("Rotation"); @@ -964,6 +962,11 @@ public abstract class Entity { } } // CraftBukkit end + + // CraftBukkit Start - reset world + org.bukkit.World world = Bukkit.getServer().getWorld(nbttagcompound.getString("World")); + a(world == null ? null : ((CraftWorld) world).getHandle()); + // CraftBukkit End } protected final String af() {