Add new method to check if any players are in any arena
This commit is contained in:
parent
e144827afd
commit
b353589963
@ -457,4 +457,14 @@ public class ArenaHandler {
|
||||
arena.timer = 0;
|
||||
arena.playersInArena.clear();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean noPlayersInArenas() {
|
||||
// Check if there are any players in any arena (quick way to early exit for event handlers)
|
||||
for (Arena arena : W.arenaList) {
|
||||
if (arena.playersInArena.size() > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user