Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
23 Zeilen
996 B
Diff
23 Zeilen
996 B
Diff
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
|
|
index 6e1618f32f1b5a896fa647d857eed4356115dcdd..f87a6248a9e920d0e64d7971b0f056d06bc222e8 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2766,5 +2766,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
|
|
}
|