diff options
author | snowleo <schneeleo@gmail.com> | 2011-12-07 10:37:34 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-12-07 10:37:34 +0100 |
commit | ef49d92c49a3f83a214a9a9ce970108a4611e1b4 (patch) | |
tree | 55b36a8cee05cdedfa8f4178aff97327ca597e38 /EssentialsSpawn/src/com/earth2me | |
parent | 719539d63be88bb1308bfcba28b12f51a2e4016b (diff) | |
download | Essentials-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.java | 6 |
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) { |