summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-11-27 04:09:34 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2011-11-27 04:09:34 +0000
commit8d49f500ec98b5f721bd5202edba12d8158175f1 (patch)
tree79319ee025620c33ed4e6a0f52da7b0a58d3f464 /src/main/java
parent402e3c26e12830d5bf3822ec12fd6c18af14d1dd (diff)
downloadcraftbukkit-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/main/java')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java2
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;