From 714dbcc8e2155f9ad508ddfb32a70132cadb5adb Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Fri, 1 Oct 2021 12:53:24 +0200 Subject: [PATCH] Fix plugin provides load order (#6687) --- .../api/Fix-plugin-provides-load-order.patch | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 patches/api/Fix-plugin-provides-load-order.patch diff --git a/patches/api/Fix-plugin-provides-load-order.patch b/patches/api/Fix-plugin-provides-load-order.patch new file mode 100644 index 0000000000..8068cedb1c --- /dev/null +++ b/patches/api/Fix-plugin-provides-load-order.patch @@ -0,0 +1,27 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Nassim Jahnke +Date: Fri, 1 Oct 2021 09:47:00 +0200 +Subject: [PATCH] Fix plugin provides load order + +Fixes https://hub.spigotmc.org/jira/browse/SPIGOT-6740 + +diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java ++++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java +@@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager { + // Paper end + missingDependency = false; + pluginIterator.remove(); ++ pluginsProvided.values().removeIf(s -> s.equals(plugin)); // Paper - remove provided plugins + softDependencies.remove(plugin); + dependencies.remove(plugin); + +@@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager { + // We're clear to load, no more soft or hard dependencies left + File file = plugins.get(plugin); + pluginIterator.remove(); ++ pluginsProvided.values().removeIf(s -> s.equals(plugin)); // Paper - remove provided plugins + missingDependency = false; + + try {