From 19171265b995df8f3c6c8d6e1f194dcf9b3521cc Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 24 Jul 2012 21:23:33 -0700 Subject: [PATCH] [Bleeding] Fix NPE in getBedSpawnLocation. Fixes BUKKIT-1949 By: EdGruberman --- .../main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java index 4a0d8dcb4d..d35c0fad0d 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java +++ b/paper-server/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("")) {