2020-04-22 00:06:30 +02:00
|
|
|
From f8911e9e778ab7c9639dde796cdb7e18bbc48034 Mon Sep 17 00:00:00 2001
|
2020-04-11 07:51:35 +02: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-04-22 00:06:30 +02:00
|
|
|
index 53b71b79..8cc0f66c 100644
|
2020-04-11 07:51:35 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
2020-04-11 10:40:00 +02:00
|
|
|
@@ -2217,5 +2217,10 @@ public final class CraftServer implements Server {
|
2020-04-11 07:51:35 +02:00
|
|
|
public int getCurrentTick() {
|
|
|
|
return net.minecraft.server.MinecraftServer.currentTick;
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public boolean isStopping() {
|
2020-04-12 03:26:16 +02:00
|
|
|
+ return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
2020-04-11 07:51:35 +02:00
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|
|
|
|
--
|
2020-04-22 00:06:30 +02:00
|
|
|
2.25.1.windows.1
|
2020-04-11 07:51:35 +02:00
|
|
|
|