Make sure, we will never give a null as respawn location.

git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1430 e251c2fe-e539-e718-e476-b85c1f46cddb
This commit is contained in:
snowleo 2011-05-13 14:31:07 +00:00
parent 9af0566229
commit fdb9473baa

View File

@ -33,7 +33,11 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
catch (Throwable ex)
{
}
event.setRespawnLocation(Essentials.getSpawn().getSpawn(user.getGroup()));
Location spawn = Essentials.getSpawn().getSpawn(user.getGroup());
if (spawn == null) {
return;
}
event.setRespawnLocation(spawn);
}
@Override