13
0
geforkt von Mirrors/Paper

Expose MinecraftServer#isRunning

This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
Dieser Commit ist enthalten in:
JRoy 2020-04-10 21:24:35 -04:00
Ursprung c0e42aed8a
Commit a690b2a859
2 geänderte Dateien mit 16 neuen und 0 gelöschten Zeilen

Datei anzeigen

@ -2575,6 +2575,15 @@ public final class Bukkit {
public static int getCurrentTick() {
return server.getCurrentTick();
}
/**
* Checks if the server is in the process of being shutdown.
*
* @return true if server is in the process of being shutdown
*/
public static boolean isStopping() {
return server.isStopping();
}
// Paper end
@NotNull

Datei anzeigen

@ -2243,5 +2243,12 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
* @return Current tick
*/
int getCurrentTick();
/**
* Checks if the server is in the process of being shutdown.
*
* @return true if server is in the process of being shutdown
*/
boolean isStopping();
// Paper end
}