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 aba9eda0a2
commit 1e0108ad9d
2 changed files with 6 additions and 2 deletions
@@ -78,8 +78,8 @@ public final class SystemTermination {
}
});
}
} catch (Throwable t) {
t.printStackTrace();
} catch (Exception e) {
e.printStackTrace();
}
}
// ServerStore.dump(directory + "store/");
@@ -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)
}
}
}