From eceb7fc6d2f51c8ccf04cd0ff513b5fb3fbbf289 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 30 Apr 2024 16:32:15 +0200 Subject: [PATCH] Makes sure levers are reset on an immediate quit --- .../knarcraft/minigames/arena/parkour/ParkourArenaSession.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/knarcraft/minigames/arena/parkour/ParkourArenaSession.java b/src/main/java/net/knarcraft/minigames/arena/parkour/ParkourArenaSession.java index eaa3608..92def56 100644 --- a/src/main/java/net/knarcraft/minigames/arena/parkour/ParkourArenaSession.java +++ b/src/main/java/net/knarcraft/minigames/arena/parkour/ParkourArenaSession.java @@ -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(); } }