diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-27 04:09:34 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-11-27 04:09:34 +0000 |
commit | 8d49f500ec98b5f721bd5202edba12d8158175f1 (patch) | |
tree | 79319ee025620c33ed4e6a0f52da7b0a58d3f464 /src | |
parent | 402e3c26e12830d5bf3822ec12fd6c18af14d1dd (diff) | |
download | craftbukkit-8d49f500ec98b5f721bd5202edba12d8158175f1.tar craftbukkit-8d49f500ec98b5f721bd5202edba12d8158175f1.tar.gz craftbukkit-8d49f500ec98b5f721bd5202edba12d8158175f1.tar.lz craftbukkit-8d49f500ec98b5f721bd5202edba12d8158175f1.tar.xz craftbukkit-8d49f500ec98b5f721bd5202edba12d8158175f1.zip |
Fixed NPE in CraftPlayer.getBedSpawnLocation
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 04b69b44..bf404b4a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -534,7 +534,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public Location getBedSpawnLocation() { World world = getServer().getWorld(getHandle().spawnWorld); - if (world != null) { + if ((world != null) && (getHandle().getBed() != null)) { return new Location(world, getHandle().getBed().x, getHandle().getBed().y, getHandle().getBed().z); } else { return null; |