mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
Allow the use of the world spawn in EssentialsSpawn for new players.
This commit is contained in:
parent
b851cd10f2
commit
2e565f8881
2 changed files with 14 additions and 10 deletions
|
@ -484,6 +484,7 @@ newbies:
|
||||||
announce-format: '&dWelcome {DISPLAYNAME} to the server!'
|
announce-format: '&dWelcome {DISPLAYNAME} to the server!'
|
||||||
|
|
||||||
# When we spawn for the first time, which spawnpoint do we use?
|
# When we spawn for the first time, which spawnpoint do we use?
|
||||||
|
# Set to "none" if you want to use the spawn point of the world.
|
||||||
spawnpoint: newbies
|
spawnpoint: newbies
|
||||||
|
|
||||||
# End of File <-- No seriously, you're done with configuration.
|
# End of File <-- No seriously, you're done with configuration.
|
||||||
|
|
|
@ -59,20 +59,23 @@ public class EssentialsSpawnPlayerListener extends PlayerListener
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
user.setNew(false);
|
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())
|
if (ess.getSettings().getAnnounceNewPlayers())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue