mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-22 22:34:43 +02:00
Don't run calls against bucket api in async login thread
This commit is contained in:
@@ -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)
|
||||||
|
Reference in New Issue
Block a user