summaryrefslogtreecommitdiffstats
path: root/EssentialsSpawn/src/com/earth2me
diff options
context:
space:
mode:
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)
{