1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-18 04:21:31 +02:00

Allow the use of the world spawn in EssentialsSpawn for new players.

This commit is contained in:
snowleo
2011-08-11 13:31:57 +02:00
parent d7db16c305
commit 45162f70b1
2 changed files with 14 additions and 10 deletions

View File

@@ -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())
{