[Bleeding] Fix NPE in getBedSpawnLocation. Fixes BUKKIT-1949

This commit is contained in:
EdGruberman 2012-07-24 21:23:33 -07:00 committed by feildmaster
parent 090c1a60bd
commit 24abdd556d

View File

@ -198,6 +198,8 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
public Location getBedSpawnLocation() {
NBTTagCompound data = getData();
if (data == null) return null;
if (data.hasKey("SpawnX") && data.hasKey("SpawnY") && data.hasKey("SpawnZ")) {
String spawnWorld = data.getString("SpawnWorld");
if (spawnWorld.equals("")) {