2023-03-04 22:13:23 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
|
|
|
Date: Sat, 4 Mar 2023 12:48:43 -0800
|
|
|
|
Subject: [PATCH] Region scheduler API
|
|
|
|
|
2023-03-20 00:43:34 +01:00
|
|
|
Add both a location based scheduler, an entity based scheduler,
|
|
|
|
and a global region scheduler.
|
2023-03-04 22:13:23 +01:00
|
|
|
|
2023-03-06 21:57:29 +01:00
|
|
|
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
2024-06-19 23:42:39 +02:00
|
|
|
index 003bece642b682985625db93cad93026352bfc66..065352b383d6398382b4f14641859dbfe2e6a355 100644
|
2023-03-06 21:57:29 +01:00
|
|
|
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
|
|
|
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
2024-06-19 23:42:39 +02:00
|
|
|
@@ -557,9 +557,9 @@ public final class SimplePluginManager implements PluginManager {
|
2023-03-06 21:57:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
- server.getScheduler().cancelTasks(plugin);
|
2023-03-23 10:51:04 +01:00
|
|
|
+ server.getAsyncScheduler().cancelTasks(plugin); // Folia - new schedulers
|
2023-03-06 21:57:29 +01:00
|
|
|
} catch (Throwable ex) {
|
2023-03-23 10:51:04 +01:00
|
|
|
- handlePluginException("Error occurred (in the plugin loader) while cancelling tasks for "
|
|
|
|
+ handlePluginException("Error occurred (in the plugin loader) while cancelling async tasks for " // Folia - new schedulers
|
2023-03-06 21:57:29 +01:00
|
|
|
+ plugin.getDescription().getFullName() + " (Is it up to date?)", ex, plugin); // Paper
|
2023-03-23 10:51:04 +01:00
|
|
|
}
|
|
|
|
|
2023-03-26 00:29:07 +01:00
|
|
|
diff --git a/src/main/java/org/bukkit/scheduler/BukkitScheduler.java b/src/main/java/org/bukkit/scheduler/BukkitScheduler.java
|
2023-12-17 00:32:48 +01:00
|
|
|
index 487b5ca23159b531475c3d650894be707b49914e..31b90d1c2259a8f200b0589909dbbfe4cc526989 100644
|
2023-03-26 00:29:07 +01:00
|
|
|
--- a/src/main/java/org/bukkit/scheduler/BukkitScheduler.java
|
|
|
|
+++ b/src/main/java/org/bukkit/scheduler/BukkitScheduler.java
|
|
|
|
@@ -7,6 +7,15 @@ import java.util.function.Consumer;
|
|
|
|
import org.bukkit.plugin.Plugin;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
|
|
|
|
+// Folia start - add new schedulers
|
|
|
|
+/**
|
|
|
|
+ * @deprecated Use one of {@link io.papermc.paper.threadedregions.scheduler.RegionScheduler},
|
|
|
|
+ * {@link io.papermc.paper.threadedregions.scheduler.AsyncScheduler},
|
|
|
|
+ * {@link io.papermc.paper.threadedregions.scheduler.EntityScheduler},
|
|
|
|
+ * or {@link io.papermc.paper.threadedregions.scheduler.GlobalRegionScheduler}
|
|
|
|
+ */
|
|
|
|
+// Folia end - add new schedulers
|
|
|
|
+@Deprecated
|
|
|
|
public interface BukkitScheduler {
|
|
|
|
|
|
|
|
/**
|