This commit is contained in:
Anuken
2020-08-18 16:56:30 -04:00
parent e96fcb3cb7
commit 26acf7cbbc
8 changed files with 27 additions and 29 deletions

View File

@@ -86,6 +86,21 @@ public class ServerControl implements ApplicationListener{
registerCommands();
Core.app.post(() -> {
//try to load auto-update save if possible
if(Config.autoUpdate.bool()){
Fi fi = saveDirectory.child("autosavebe." + saveExtension);
if(fi.exists()){
try{
SaveIO.load(fi);
info("Auto-save loaded.");
state.set(State.playing);
netServer.openServer();
}catch(Throwable e){
Log.err(e);
}
}
}
Seq<String> commands = new Seq<>();
if(args.length > 0){