mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 18:45:21 +01:00
Fix issue with checking render-playerlimit
This commit is contained in:
parent
4c9b45e6eb
commit
efd365daeb
@ -478,12 +478,22 @@ public boolean flushWorldUpdates(World world) throws IOException {
|
||||
|
||||
@Override
|
||||
public void onPlayerJoin(UUID playerUuid) {
|
||||
checkPausedByPlayerCount();
|
||||
checkPausedByPlayerCountSoon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerLeave(UUID playerUuid) {
|
||||
checkPausedByPlayerCount();
|
||||
checkPausedByPlayerCountSoon();
|
||||
}
|
||||
|
||||
private void checkPausedByPlayerCountSoon() {
|
||||
// check is done a second later to make sure the player has actually joined/left and is no longer on the list
|
||||
daemonTimer.schedule(new TimerTask() {
|
||||
@Override
|
||||
public void run() {
|
||||
checkPausedByPlayerCount();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
public boolean checkPausedByPlayerCount() {
|
||||
|
Loading…
Reference in New Issue
Block a user