Paper/patches/api/0498-API-to-check-if-the-server-is-sleeping.patch

23 lines
918 B
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Abel <abelvanhulst@gmail.com>
Date: Sun, 10 Nov 2024 16:32:51 +0100
Subject: [PATCH] API to check if the server is sleeping
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 0b78564256ebc647ebac402e549d86ab6e307c8d..ba366576a571214e67bcc529dc1bca19e1d59ef8 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -2572,4 +2572,11 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
// Paper end - Folia region threading API
+
+ // Paper start - API to check if the server is sleeping
+ /**
+ * Returns whether the server is sleeping/paused.
+ */
+ boolean isPaused();
+ // Paper end - API to check if the server is sleeping
}