summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorEdGruberman <ed@rjump.com>2012-07-24 21:23:33 -0700
committerfeildmaster <admin@feildmaster.com>2012-12-08 02:18:06 -0600
commit24abdd556d26576610a66bb00c925bd8fcca7ced (patch)
treedfd840c5083e837264d3ca1ddd69661bfdce43e2 /src/main/java
parent090c1a60bde0fa830d255a138d819a593d79864a (diff)
downloadcraftbukkit-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
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java2
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("")) {