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 6b7dc90df1d023d867f0eec30edd0e49f49899a1..8d104a58a5ebe4e019d398f17286527f2d33dac7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -2781,5 +2781,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 }