2021-06-11 14:02:28 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
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
|
2021-06-20 21:25:59 +02:00
|
|
|
index 6263a646f1fbf7cb25d9e4f0821b94f2088acd92..2f7ab3142f44c657f3585c8f8a6872fbfac81768 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2021-06-20 21:25:59 +02:00
|
|
|
@@ -2374,5 +2374,10 @@ public final class CraftServer implements Server {
|
2021-06-11 14:02:28 +02:00
|
|
|
public int getCurrentTick() {
|
|
|
|
return net.minecraft.server.MinecraftServer.currentTick;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean isStopping() {
|
|
|
|
+ return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|