added shutdown command and improved error logging for shutdown sequence

This commit is contained in:
ceikry 2021-07-21 20:18:29 -05:00
parent e76247bc9a
commit b49287830e
2 changed files with 6 additions and 2 deletions

View file

@ -78,8 +78,8 @@ public final class SystemTermination {
}
});
}
} catch (Throwable t) {
t.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
// ServerStore.dump(directory + "store/");

View file

@ -233,5 +233,9 @@ class SystemCommandSet : CommandSet(Command.Privilege.ADMIN) {
player.inventory.add(Item(Items.ROTTEN_POTATO_5733))
}
define("shutdown",Command.Privilege.ADMIN) { player, _ ->
SystemManager.flag(SystemState.TERMINATED)
}
}
}