diff options
Diffstat (limited to 'Essentials/src/com/earth2me/essentials/craftbukkit/BedLocationFix.java')
-rw-r--r-- | Essentials/src/com/earth2me/essentials/craftbukkit/BedLocationFix.java | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Essentials/src/com/earth2me/essentials/craftbukkit/BedLocationFix.java b/Essentials/src/com/earth2me/essentials/craftbukkit/BedLocationFix.java deleted file mode 100644 index dc4818284..000000000 --- a/Essentials/src/com/earth2me/essentials/craftbukkit/BedLocationFix.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.earth2me.essentials.craftbukkit; - -import org.bukkit.Location; -import org.bukkit.World; -import org.bukkit.craftbukkit.entity.CraftPlayer; -import org.bukkit.entity.Player; - - -public class BedLocationFix -{ - /* - * Adds missing null pointer check to getHandle().getBed() - */ - public static Location getBedSpawnLocation(final Player player) - { - final CraftPlayer cplayer = (CraftPlayer)player; - final World world = player.getServer().getWorld(cplayer.getHandle().spawnWorld); - if (world != null && cplayer.getHandle().getBed() != null) - { - return new Location(world, cplayer.getHandle().getBed().x, cplayer.getHandle().getBed().y, cplayer.getHandle().getBed().z); - } - else - { - return null; - } - } -} |