diff options
author | EdGruberman <ed@rjump.com> | 2012-07-24 21:23:33 -0700 |
---|---|---|
committer | feildmaster <admin@feildmaster.com> | 2012-12-08 02:18:06 -0600 |
commit | 24abdd556d26576610a66bb00c925bd8fcca7ced (patch) | |
tree | dfd840c5083e837264d3ca1ddd69661bfdce43e2 | |
parent | 090c1a60bde0fa830d255a138d819a593d79864a (diff) | |
download | craftbukkit-24abdd556d26576610a66bb00c925bd8fcca7ced.tar craftbukkit-24abdd556d26576610a66bb00c925bd8fcca7ced.tar.gz craftbukkit-24abdd556d26576610a66bb00c925bd8fcca7ced.tar.lz craftbukkit-24abdd556d26576610a66bb00c925bd8fcca7ced.tar.xz craftbukkit-24abdd556d26576610a66bb00c925bd8fcca7ced.zip |
[Bleeding] Fix NPE in getBedSpawnLocation. Fixes BUKKIT-1949
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java index 4a0d8dcb..d35c0fad 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java @@ -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("")) { |