mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
Set a players sleeping ignored status synchronously, just in case! Thanks for the hint mbaxter & Wolvereness. Closes ticket 3179.
This commit is contained in:
parent
0df0be5762
commit
6c1da1d552
@ -166,7 +166,8 @@ public class EssentialsPlayerListener implements Listener
|
||||
for (String p : ess.getVanishedPlayers())
|
||||
{
|
||||
Player toVanish = ess.getUser(p).getBase();
|
||||
if (toVanish.isOnline()) {
|
||||
if (toVanish.isOnline())
|
||||
{
|
||||
user.hidePlayer(toVanish);
|
||||
}
|
||||
}
|
||||
@ -174,7 +175,14 @@ public class EssentialsPlayerListener implements Listener
|
||||
|
||||
if (user.isAuthorized("essentials.sleepingignored"))
|
||||
{
|
||||
user.setSleepingIgnored(true);
|
||||
ess.scheduleSyncDelayedTask(new Runnable()
|
||||
{
|
||||
@Override
|
||||
public void run()
|
||||
{
|
||||
user.setSleepingIgnored(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!ess.getSettings().isCommandDisabled("motd") && user.isAuthorized("essentials.motd"))
|
||||
@ -356,9 +364,10 @@ public class EssentialsPlayerListener implements Listener
|
||||
public void onPlayerChangedWorldHack(final PlayerChangedWorldEvent event)
|
||||
{
|
||||
final Player user = event.getPlayer();
|
||||
if (user.getGameMode() != GameMode.CREATIVE) {
|
||||
user.setAllowFlight(false);
|
||||
}
|
||||
if (user.getGameMode() != GameMode.CREATIVE)
|
||||
{
|
||||
user.setAllowFlight(false);
|
||||
}
|
||||
user.setFlySpeed(0.1f);
|
||||
user.setWalkSpeed(0.2f);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user