better shutdown hook

This commit is contained in:
ceikry
2021-07-21 20:19:42 -05:00
parent 1e0108ad9d
commit b503d8067f
@@ -12,6 +12,7 @@ import core.plugin.Initializable
import org.rs09.consts.Items import org.rs09.consts.Items
import rs09.game.system.command.Command import rs09.game.system.command.Command
import rs09.game.world.repository.Repository import rs09.game.world.repository.Repository
import kotlin.system.exitProcess
@Initializable @Initializable
class SystemCommandSet : CommandSet(Command.Privilege.ADMIN) { class SystemCommandSet : CommandSet(Command.Privilege.ADMIN) {
@@ -234,7 +235,7 @@ class SystemCommandSet : CommandSet(Command.Privilege.ADMIN) {
} }
define("shutdown",Command.Privilege.ADMIN) { player, _ -> define("shutdown",Command.Privilege.ADMIN) { player, _ ->
SystemManager.flag(SystemState.TERMINATED) exitProcess(0)
} }
} }