ServerControl was broken, yet again (#10661)

This commit is contained in:
WMF
2025-04-15 15:42:45 -04:00
committed by GitHub
parent 666c68edb1
commit 39834f21db
+11 -11
View File
@@ -248,18 +248,8 @@ public class ServerControl implements ApplicationListener{
} }
} }
} }
});
Events.run(Trigger.socketConfigChanged, () -> { if(state.isGame()){ //run this only if the server's actually hosting
toggleSocket(false);
toggleSocket(Config.socketInput.bool());
});
Events.on(ResetEvent.class, e -> {
autoPaused = false;
});
Events.run(Trigger.update, () -> {
if(Config.autoPause.bool()){ if(Config.autoPause.bool()){
if(Groups.player.isEmpty()){ if(Groups.player.isEmpty()){
autoPaused = true; autoPaused = true;
@@ -272,6 +262,16 @@ public class ServerControl implements ApplicationListener{
state.set(State.playing); state.set(State.playing);
autoPaused = false; autoPaused = false;
} }
}
});
Events.run(Trigger.socketConfigChanged, () -> {
toggleSocket(false);
toggleSocket(Config.socketInput.bool());
});
Events.on(ResetEvent.class, e -> {
autoPaused = false;
}); });
Events.on(PlayEvent.class, e -> { Events.on(PlayEvent.class, e -> {