geforkt von Mirrors/Paper
Fix Folia scheduler tasks not canceling when plugin disable (#10091)
Dieser Commit ist enthalten in:
Ursprung
0c4e87fd28
Commit
09ae4f6257
@ -16,6 +16,33 @@ by the regionaliser, as it is not guaranteed that anything
|
||||
outside of the buffer zone is owned. Then, the plugins may use
|
||||
the schedulers depending on the result of the ownership check.
|
||||
|
||||
diff --git a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
+++ b/src/main/java/io/papermc/paper/plugin/manager/PaperPluginInstanceManager.java
|
||||
@@ -0,0 +0,0 @@ class PaperPluginInstanceManager {
|
||||
+ pluginName + " (Is it up to date?)", ex, plugin); // Paper
|
||||
}
|
||||
|
||||
+ // Paper start - Folia schedulers
|
||||
+ try {
|
||||
+ this.server.getGlobalRegionScheduler().cancelTasks(plugin);
|
||||
+ } catch (Throwable ex) {
|
||||
+ this.handlePluginException("Error occurred (in the plugin loader) while cancelling global tasks for "
|
||||
+ + pluginName + " (Is it up to date?)", ex, plugin); // Paper
|
||||
+ }
|
||||
+
|
||||
+ try {
|
||||
+ this.server.getAsyncScheduler().cancelTasks(plugin);
|
||||
+ } catch (Throwable ex) {
|
||||
+ this.handlePluginException("Error occurred (in the plugin loader) while cancelling async tasks for "
|
||||
+ + pluginName + " (Is it up to date?)", ex, plugin); // Paper
|
||||
+ }
|
||||
+ // Paper end - Folia schedulers
|
||||
+
|
||||
try {
|
||||
this.server.getServicesManager().unregisterAll(plugin);
|
||||
} catch (Throwable ex) {
|
||||
diff --git a/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java b/src/main/java/io/papermc/paper/threadedregions/EntityScheduler.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren