2020-05-06 09:22:03 +00:00
|
|
|
From eae3de0690b07e74af36a82ae65df6bb06ebf5a6 Mon Sep 17 00:00:00 2001
|
2020-04-11 05:51:35 +00:00
|
|
|
From: JRoy <joshroy126@gmail.com>
|
|
|
|
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
|
2020-05-06 09:22:03 +00:00
|
|
|
index 4a41003203b..b627180729a 100644
|
2020-04-11 05:51:35 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2020-04-27 07:34:45 +00:00
|
|
|
@@ -2218,5 +2218,10 @@ public final class CraftServer implements Server {
|
2020-04-11 05:51:35 +00:00
|
|
|
public int getCurrentTick() {
|
|
|
|
return net.minecraft.server.MinecraftServer.currentTick;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean isStopping() {
|
2020-04-12 01:26:16 +00:00
|
|
|
+ return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
2020-04-11 05:51:35 +00:00
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|
|
|
|
--
|
2020-05-06 09:22:03 +00:00
|
|
|
2.26.2
|
2020-04-11 05:51:35 +00:00
|
|
|
|