summaryrefslogtreecommitdiffstats
path: root/EssentialsSpawn/src/com/earth2me
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-12-07 10:37:34 +0100
committersnowleo <schneeleo@gmail.com>2011-12-07 10:37:34 +0100
commitef49d92c49a3f83a214a9a9ce970108a4611e1b4 (patch)
tree55b36a8cee05cdedfa8f4178aff97327ca597e38 /EssentialsSpawn/src/com/earth2me
parent719539d63be88bb1308bfcba28b12f51a2e4016b (diff)
downloadEssentials-ef49d92c49a3f83a214a9a9ce970108a4611e1b4.tar
Essentials-ef49d92c49a3f83a214a9a9ce970108a4611e1b4.tar.gz
Essentials-ef49d92c49a3f83a214a9a9ce970108a4611e1b4.tar.lz
Essentials-ef49d92c49a3f83a214a9a9ce970108a4611e1b4.tar.xz
Essentials-ef49d92c49a3f83a214a9a9ce970108a4611e1b4.zip
Null check in new player teleport, fixes #1212
Diffstat (limited to 'EssentialsSpawn/src/com/earth2me')
-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 8c3678a92..530a00faa 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -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)
{