diff options
author | Abel <[email protected]> | 2024-11-12 22:25:35 +0100 |
---|---|---|
committer | Abel <[email protected]> | 2024-11-12 22:25:35 +0100 |
commit | b9a4e9a745e947dff635ee7b68fb644db99df591 (patch) | |
tree | 7e1ef052bfac94f76971d81c48ef0cd7e3cc1a2b /paper-api/src | |
parent | 7c0d854ed3a692461bd366c6ca2053349d083e54 (diff) | |
download | Paper-b9a4e9a745e947dff635ee7b68fb644db99df591.tar.gz Paper-b9a4e9a745e947dff635ee7b68fb644db99df591.zip |
API to allow/disallow tick sleeping
Diffstat (limited to 'paper-api/src')
-rw-r--r-- | paper-api/src/main/java/org/bukkit/Server.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/paper-api/src/main/java/org/bukkit/Server.java b/paper-api/src/main/java/org/bukkit/Server.java index 0731b4dd74..ad816538b3 100644 --- a/paper-api/src/main/java/org/bukkit/Server.java +++ b/paper-api/src/main/java/org/bukkit/Server.java @@ -2597,5 +2597,14 @@ 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 } |