mirror of
https://github.com/SunNetservers/MiniGames.git
synced 2025-01-31 08:49:34 +01:00
Makes sure levers are reset on an immediate quit
This commit is contained in:
parent
fb68c18fe6
commit
eceb7fc6d2
@ -184,7 +184,8 @@ public class ParkourArenaSession extends AbstractArenaSession {
|
||||
public void triggerQuit(boolean immediately, boolean removeSession) {
|
||||
super.triggerQuit(immediately, removeSession);
|
||||
|
||||
if (MiniGames.getInstance().getParkourArenaPlayerRegistry().getPlayingPlayers(this.arena).isEmpty()) {
|
||||
// Note: As immediately is only used when stopping the server, levers should be reset regardless of current players
|
||||
if (MiniGames.getInstance().getParkourArenaPlayerRegistry().getPlayingPlayers(this.arena).isEmpty() || immediately) {
|
||||
resetLevers();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user