773dd72446
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking 997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping 6a8ce581 Fix malformed javadoc in previous commit 26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event) aa067abf PR-895: Load GameEvent and MusicInstrument from registry CraftBukkit Changes: 78796c9de Add support for Java 21 ddc9a2dad SPIGOT-7475: Don't fire SculkBloomEvent during world generation caee2311a PR-1245: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping de421cf56 PR-1242: Add more Sculk API (bloom, shriek, bloom event) 00f5a80fb PR-1252: Fix error when generating a tree in water 10219df3a PR-1248: Load GameEvent and MusicInstrument from registry
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 677ddf5e368a5407e6935973a87eedb19b02dfee..4d003aa1066a1fd56683be9ebe4095dddcb1ed83 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
|
@@ -2761,5 +2761,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
|
|
}
|