From 627a50b507d344a4b523f50a0d9b1fd6d794c47c Mon Sep 17 00:00:00 2001 From: snowleo Date: Fri, 13 May 2011 14:31:07 +0000 Subject: 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 --- .../earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'EssentialsSpawn') diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java index 1531f4220..aef901acf 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java @@ -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 -- cgit v1.2.3