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);
|
updateCompass(user);
|
||||||
user.setLastLogin(System.currentTimeMillis());
|
user.setLastLogin(System.currentTimeMillis());
|
||||||
user.updateActivity(false);
|
user.updateActivity(false);
|
||||||
|
ess.scheduleSyncDelayedTask(new Runnable()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
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.getUser(p).getBase();
|
Player toVanish = ess.getServer().getPlayerExact(p);
|
||||||
if (toVanish.isOnline())
|
if (toVanish != null && toVanish.isOnline())
|
||||||
{
|
{
|
||||||
user.hidePlayer(toVanish);
|
user.hidePlayer(toVanish);
|
||||||
}
|
}
|
||||||
|
@ -189,16 +194,9 @@ public class EssentialsPlayerListener implements Listener
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.isAuthorized("essentials.sleepingignored"))
|
if (user.isAuthorized("essentials.sleepingignored"))
|
||||||
{
|
|
||||||
ess.scheduleSyncDelayedTask(new Runnable()
|
|
||||||
{
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
{
|
||||||
user.setSleepingIgnored(true);
|
user.setSleepingIgnored(true);
|
||||||
}
|
}
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd"))
|
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
|
// Makes the compass item ingame always point to the first essentials home. #EasterEgg
|
||||||
private void updateCompass(final User user)
|
private void updateCompass(final User user)
|
||||||
|
|
Loading…
Reference in a new issue