From 2dcfd331a4ffa2d46fc9859b33ed609e9bd1bbfa Mon Sep 17 00:00:00 2001 From: IThundxr Date: Thu, 5 Sep 2024 16:28:29 -0400 Subject: [PATCH] update mixin again --- .../ithundxr/railwaystweaks/mixin/DedicatedServerMixin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/dev/ithundxr/railwaystweaks/mixin/DedicatedServerMixin.java b/src/main/java/dev/ithundxr/railwaystweaks/mixin/DedicatedServerMixin.java index 59bd083..8b2154d 100644 --- a/src/main/java/dev/ithundxr/railwaystweaks/mixin/DedicatedServerMixin.java +++ b/src/main/java/dev/ithundxr/railwaystweaks/mixin/DedicatedServerMixin.java @@ -19,7 +19,7 @@ import java.lang.management.ThreadInfo; import java.lang.management.ThreadMXBean; -@Mixin(value = DedicatedServer.class, priority = 100000000) +@Mixin(value = DedicatedServer.class, priority = Integer.MAX_VALUE) public abstract class DedicatedServerMixin { @Shadow @Final static Logger LOGGER; @@ -56,7 +56,7 @@ public abstract class DedicatedServerMixin { if ("true".equalsIgnoreCase(System.getProperty("railwaystweaks.shutdown.forcefully"))) { RailwaysTweaks.LOGGER.info("Force shutting down server, threads will be stuck"); - System.exit(0); + Runtime.getRuntime().halt(0); } } }