summaryrefslogtreecommitdiffstats
path: root/EssentialsSpawn/src
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-13 14:31:07 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-13 14:31:07 +0000
commitfdb9473baa8448847e3d039730d2939dc49b46c4 (patch)
treee7d8624c916e017ea3ce88c98128a814bf09dd85 /EssentialsSpawn/src
parent9af056622936f6cac2d3eb8637027348c8b7c0b9 (diff)
downloadEssentials-fdb9473baa8448847e3d039730d2939dc49b46c4.tar
Essentials-fdb9473baa8448847e3d039730d2939dc49b46c4.tar.gz
Essentials-fdb9473baa8448847e3d039730d2939dc49b46c4.tar.lz
Essentials-fdb9473baa8448847e3d039730d2939dc49b46c4.tar.xz
Essentials-fdb9473baa8448847e3d039730d2939dc49b46c4.zip
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
Diffstat (limited to 'EssentialsSpawn/src')
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java6
1 files changed, 5 insertions, 1 deletions
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