mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Don't run calls against bucket api in async login thread
This commit is contained in:
parent
12786a260e
commit
cef8cf7b75
1 changed files with 68 additions and 68 deletions
|
@ -175,13 +175,18 @@ public class EssentialsPlayerListener implements Listener
|
|||
updateCompass(user);
|
||||
user.setLastLogin(System.currentTimeMillis());
|
||||
user.updateActivity(false);
|
||||
|
||||
ess.scheduleSyncDelayedTask(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
if (!ess.getVanishedPlayers().isEmpty() && !user.isAuthorized("essentials.vanish.see"))
|
||||
{
|
||||
|
||||
for (String p : ess.getVanishedPlayers())
|
||||
{
|
||||
Player toVanish = ess.getUser(p).getBase();
|
||||
if (toVanish.isOnline())
|
||||
Player toVanish = ess.getServer().getPlayerExact(p);
|
||||
if (toVanish != null && toVanish.isOnline())
|
||||
{
|
||||
user.hidePlayer(toVanish);
|
||||
}
|
||||
|
@ -189,16 +194,9 @@ public class EssentialsPlayerListener implements Listener
|
|||
}
|
||||
|
||||
if (user.isAuthorized("essentials.sleepingignored"))
|
||||
{
|
||||
ess.scheduleSyncDelayedTask(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
user.setSleepingIgnored(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd"))
|
||||
{
|
||||
|
@ -257,6 +255,8 @@ public class EssentialsPlayerListener implements Listener
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Makes the compass item ingame always point to the first essentials home. #EasterEgg
|
||||
private void updateCompass(final User user)
|
||||
|
|
Loading…
Reference in a new issue