From 0fd26e68d4073522ad9007517e6d5cb25b0be80a Mon Sep 17 00:00:00 2001 From: Gureumi <44261958+Kieaer@users.noreply.github.com> Date: Thu, 9 Feb 2023 23:21:55 +0900 Subject: [PATCH] Fix server auto pause when gameover (#8220) * Fix server auto pause when gameover * Update ServerControl.java * Update ServerControl.java --- server/src/mindustry/server/ServerControl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/src/mindustry/server/ServerControl.java b/server/src/mindustry/server/ServerControl.java index 33859934dc..8ea0624670 100644 --- a/server/src/mindustry/server/ServerControl.java +++ b/server/src/mindustry/server/ServerControl.java @@ -191,7 +191,12 @@ public class ServerControl implements ApplicationListener{ info("Selected next map to be @.", Strings.stripColors(map.name())); - play(true, () -> world.loadMap(map, map.applyRules(lastMode))); + play(true, () -> { + world.loadMap(map, map.applyRules(lastMode)); + if(Config.autoPause.bool() && Groups.player.isEmpty()){ + Core.app.post(() -> state.set(State.paused)); + } + }); }else{ netServer.kickAll(KickReason.gameover); state.set(State.menu);