Null check in new player teleport, fixes #1212

This commit is contained in:
snowleo 2011-12-07 10:37:34 +01:00
parent 719539d63b
commit ef49d92c49
1 changed files with 5 additions and 1 deletions

View File

@ -85,7 +85,11 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
{
try
{
user.getTeleport().now(spawns.getSpawn(ess.getSettings().getNewbieSpawn()), false, TeleportCause.PLUGIN);
Location spawn = spawns.getSpawn(ess.getSettings().getNewbieSpawn());
if (spawn != null)
{
user.getTeleport().now(spawn, false, TeleportCause.PLUGIN);
}
}
catch (Exception ex)
{