Add a null check around some block safety checks

This commit is contained in:
Tim Ekl 2011-12-16 00:41:57 -05:00
parent 327f0ce7c4
commit 48f8e033b6
1 changed files with 5 additions and 0 deletions

View File

@ -50,6 +50,11 @@ public class BlockSafety {
* @return Whether the player can spawn safely at the given {@link Location}
*/
public boolean playerCanSpawnHereSafely(Location l) {
if(l == null) {
// Can't safely spawn at a null location!
return false;
}
World world = l.getWorld();
Location actual = l.clone();
Location upOne = l.clone();