From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: JRoy Date: Fri, 10 Apr 2020 21:24:12 -0400 Subject: [PATCH] Expose MinecraftServer#isRunning This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index e270d7786eb1eae8970ff2ed5896789e05ca6613..a67fc9b0899f9d2128ac202ba0c12776653dfe28 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2657,5 +2657,10 @@ public final class CraftServer implements Server { public int getCurrentTick() { return net.minecraft.server.MinecraftServer.currentTick; } + + @Override + public boolean isStopping() { + return net.minecraft.server.MinecraftServer.getServer().hasStopped(); + } // Paper end }