mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-04-21 04:50:59 -07:00
Fixed #9422
This commit is contained in:
parent
9b6d95c507
commit
288c969f51
2 changed files with 10 additions and 1 deletions
|
|
@ -452,7 +452,7 @@ public class ArcNetProvider implements NetProvider{
|
|||
byteBuffer.put((byte)-2); //code for framework message
|
||||
writeFramework(byteBuffer, msg);
|
||||
}else{
|
||||
if(!(o instanceof Packet pack)) throw new RuntimeException("All sent objects must implement be Packets! Class: " + o.getClass());
|
||||
if(!(o instanceof Packet pack)) throw new RuntimeException("All sent objects must extend Packet! Class: " + o.getClass());
|
||||
byte id = Net.getPacketId(pack);
|
||||
byteBuffer.put(id);
|
||||
|
||||
|
|
|
|||
|
|
@ -295,6 +295,15 @@ public class ServerControl implements ApplicationListener{
|
|||
info("Server loaded. Type @ for help.", "'help'");
|
||||
});
|
||||
|
||||
Events.on(SaveLoadEvent.class, e -> {
|
||||
Core.app.post(() -> {
|
||||
if(Config.autoPause.bool() && Groups.player.size() == 0){
|
||||
state.set(State.paused);
|
||||
autoPaused = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Events.on(PlayerJoin.class, e -> {
|
||||
if(state.isPaused() && autoPaused && Config.autoPause.bool()){
|
||||
state.set(State.playing);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue