mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Might as well make it all safe.
This commit is contained in:
parent
cef8cf7b75
commit
d6c91d2d04
1 changed files with 6 additions and 11 deletions
|
@ -171,18 +171,19 @@ public class EssentialsPlayerListener implements Listener
|
||||||
}
|
}
|
||||||
ess.getBackup().onPlayerJoin();
|
ess.getBackup().onPlayerJoin();
|
||||||
final User user = ess.getUser(player);
|
final User user = ess.getUser(player);
|
||||||
user.setDisplayNick();
|
|
||||||
updateCompass(user);
|
|
||||||
user.setLastLogin(System.currentTimeMillis());
|
user.setLastLogin(System.currentTimeMillis());
|
||||||
user.updateActivity(false);
|
user.updateActivity(false);
|
||||||
|
|
||||||
ess.scheduleSyncDelayedTask(new Runnable()
|
ess.scheduleSyncDelayedTask(new Runnable()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
|
user.setDisplayNick();
|
||||||
|
updateCompass(user);
|
||||||
|
|
||||||
if (!ess.getVanishedPlayers().isEmpty() && !user.isAuthorized("essentials.vanish.see"))
|
if (!ess.getVanishedPlayers().isEmpty() && !user.isAuthorized("essentials.vanish.see"))
|
||||||
{
|
{
|
||||||
|
|
||||||
for (String p : ess.getVanishedPlayers())
|
for (String p : ess.getVanishedPlayers())
|
||||||
{
|
{
|
||||||
Player toVanish = ess.getServer().getPlayerExact(p);
|
Player toVanish = ess.getServer().getPlayerExact(p);
|
||||||
|
@ -236,6 +237,7 @@ public class EssentialsPlayerListener implements Listener
|
||||||
user.sendMessage(_("youHaveNewMail", mail.size()));
|
user.sendMessage(_("youHaveNewMail", mail.size()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.isAuthorized("essentials.fly.safelogin"))
|
if (user.isAuthorized("essentials.fly.safelogin"))
|
||||||
{
|
{
|
||||||
final World world = user.getLocation().getWorld();
|
final World world = user.getLocation().getWorld();
|
||||||
|
@ -269,15 +271,8 @@ public class EssentialsPlayerListener implements Listener
|
||||||
if (loc != null)
|
if (loc != null)
|
||||||
{
|
{
|
||||||
final Location updateLoc = loc;
|
final Location updateLoc = loc;
|
||||||
ess.scheduleSyncDelayedTask(new Runnable()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
user.setCompassTarget(updateLoc);
|
user.setCompassTarget(updateLoc);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler(priority = EventPriority.HIGH)
|
@EventHandler(priority = EventPriority.HIGH)
|
||||||
|
|
Loading…
Reference in a new issue