summaryrefslogtreecommitdiffstats
path: root/EssentialsSpawn/src
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-08-11 13:31:57 +0200
committersnowleo <schneeleo@gmail.com>2011-08-11 13:32:11 +0200
commit2e565f88811b5b54bd6e5b5d8ea091694ba69a3e (patch)
tree7734611fe8b0d229e9672c18b6eb5e64908ef9be /EssentialsSpawn/src
parentb851cd10f25c357651fc3fbe42aee939b7bb82ab (diff)
downloadEssentials-2e565f88811b5b54bd6e5b5d8ea091694ba69a3e.tar
Essentials-2e565f88811b5b54bd6e5b5d8ea091694ba69a3e.tar.gz
Essentials-2e565f88811b5b54bd6e5b5d8ea091694ba69a3e.tar.lz
Essentials-2e565f88811b5b54bd6e5b5d8ea091694ba69a3e.tar.xz
Essentials-2e565f88811b5b54bd6e5b5d8ea091694ba69a3e.zip
Allow the use of the world spawn in EssentialsSpawn for new players.
Diffstat (limited to 'EssentialsSpawn/src')
-rw-r--r--EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java23
1 files changed, 13 insertions, 10 deletions
diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
index f7395b49f..3c85c3661 100644
--- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
+++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawnPlayerListener.java
@@ -59,20 +59,23 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
return;
}
user.setNew(false);
- ess.scheduleSyncDelayedTask(new Runnable()
+ if (!"none".equalsIgnoreCase(ess.getSettings().getNewbieSpawn()))
{
- public void run()
+ ess.scheduleSyncDelayedTask(new Runnable()
{
- try
+ public void run()
{
- user.getTeleport().now(ess.getSpawn().getSpawn(ess.getSettings().getNewbieSpawn()));
+ try
+ {
+ user.getTeleport().now(ess.getSpawn().getSpawn(ess.getSettings().getNewbieSpawn()));
+ }
+ catch (Exception ex)
+ {
+ Logger.getLogger("Minecraft").log(Level.WARNING, Util.i18n("teleportNewPlayerError"), ex);
+ }
}
- catch (Exception ex)
- {
- Logger.getLogger("Minecraft").log(Level.WARNING, Util.i18n("teleportNewPlayerError"), ex);
- }
- }
- });
+ });
+ }
if (ess.getSettings().getAnnounceNewPlayers())
{