mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-08 08:02:13 -07:00
Add API to allow/disallow tick sleeping (#11611)
This commit is contained in:
25
patches/api/API-to-allow-disallow-tick-sleeping.patch
Normal file
25
patches/api/API-to-allow-disallow-tick-sleeping.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Abel <abelvanhulst@gmail.com>
|
||||
Date: Tue, 12 Nov 2024 22:25:35 +0100
|
||||
Subject: [PATCH] API to allow/disallow tick sleeping
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* Returns whether the server is sleeping/paused.
|
||||
*/
|
||||
boolean isPaused();
|
||||
+
|
||||
+ /**
|
||||
+ * Allows or disallows the server to sleep/pause.
|
||||
+ * If any plugin disallows pausing, the server will never pause.
|
||||
+ *
|
||||
+ * @param plugin The {@link org.bukkit.plugin.Plugin} that's allowing or disallowing pausing.
|
||||
+ * @param value Whether to allow sleeping of the server (defaults to true).
|
||||
+ */
|
||||
+ void allowPausing(@NotNull org.bukkit.plugin.Plugin plugin, boolean value);
|
||||
// Paper end - API to check if the server is sleeping
|
||||
}
|
Reference in New Issue
Block a user