Add Server#isGlobalTickThread

This method should be present in Paper, not just in Folia, given
that the GlobalRegionScheduler is present.

Additonally, add Server#isOwnedByCurrentRegion(World, int, int, int, int)
for checking of a rectangle of chunks is owned by the current region.
This commit is contained in:
Spottedleaf
2024-11-25 10:43:28 -08:00
parent c9731fc93d
commit 22dea6efbd
3 changed files with 61 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
*/
boolean isOwnedByCurrentRegion(@NotNull Entity entity);
public boolean isGlobalTickThread();
// Paper end - Folia region threading API
+
+ // Paper start - API to check if the server is sleeping