From b503d8067fb82c11e83784778e094bafd9771f89 Mon Sep 17 00:00:00 2001 From: ceikry Date: Wed, 21 Jul 2021 20:19:42 -0500 Subject: [PATCH] better shutdown hook --- .../kotlin/rs09/game/system/command/sets/SystemCommandSet.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Server/src/main/kotlin/rs09/game/system/command/sets/SystemCommandSet.kt b/Server/src/main/kotlin/rs09/game/system/command/sets/SystemCommandSet.kt index dce8d145c..53a35f777 100644 --- a/Server/src/main/kotlin/rs09/game/system/command/sets/SystemCommandSet.kt +++ b/Server/src/main/kotlin/rs09/game/system/command/sets/SystemCommandSet.kt @@ -12,6 +12,7 @@ import core.plugin.Initializable import org.rs09.consts.Items import rs09.game.system.command.Command import rs09.game.world.repository.Repository +import kotlin.system.exitProcess @Initializable class SystemCommandSet : CommandSet(Command.Privilege.ADMIN) { @@ -234,7 +235,7 @@ class SystemCommandSet : CommandSet(Command.Privilege.ADMIN) { } define("shutdown",Command.Privilege.ADMIN) { player, _ -> - SystemManager.flag(SystemState.TERMINATED) + exitProcess(0) } }