diff --git a/modules/spawn/src/main/java/net/cubespace/geSuiteSpawn/managers/SpawnManager.java b/modules/spawn/src/main/java/net/cubespace/geSuiteSpawn/managers/SpawnManager.java index b1248a2c..66a528d2 100644 --- a/modules/spawn/src/main/java/net/cubespace/geSuiteSpawn/managers/SpawnManager.java +++ b/modules/spawn/src/main/java/net/cubespace/geSuiteSpawn/managers/SpawnManager.java @@ -193,14 +193,9 @@ public static Location getServerSpawn() { public void sendPlayerToSpawn(CommandSender sender) { Player p = ( Player ) sender; - if(p.hasPermission("gesuit.spawns.spawn.bed")){ - try { - p.teleport(p.getBedSpawnLocation()); - }catch(NullPointerException e){ - //catch if they dont have a bed - } - } - if (hasWorldSpawn(p.getWorld()) && p.hasPermission("gesuit.spawns.spawn.world")) { + if (p.getBedSpawnLocation() != null && p.hasPermission("gesuit.spawns.spawn.bed")){ + p.teleport(p.getBedSpawnLocation()); + } else if (hasWorldSpawn(p.getWorld()) && p.hasPermission("gesuit.spawns.spawn.world")) { p.teleport( getWorldSpawn( p.getWorld() ) ); } else if (hasServerSpawn() && p.hasPermission("gesuit.spawns.spawn.server")) { p.teleport( getServerSpawn() );