testserver/patches/api/0327-Fix-plugin-provides-lo...

28 lines
1.5 KiB
Diff
Raw Normal View History

2021-10-01 10:53:24 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <jahnke.nassim@gmail.com>
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
2022-06-07 17:20:30 +00:00
index 35aa6dff52944019510f16180e36da0088654432..34c3df7570479d4f045897fe4e26dfa3f27479c4 100644
2021-10-01 10:53:24 +00:00
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
2022-06-07 17:20:30 +00:00
@@ -276,6 +276,7 @@ public final class SimplePluginManager implements PluginManager {
2021-10-01 10:53:24 +00:00
// Paper end
missingDependency = false;
pluginIterator.remove();
+ pluginsProvided.values().removeIf(s -> s.equals(plugin)); // Paper - remove provided plugins
softDependencies.remove(plugin);
dependencies.remove(plugin);
2022-06-07 17:20:30 +00:00
@@ -309,6 +310,7 @@ public final class SimplePluginManager implements PluginManager {
2021-10-01 10:53:24 +00:00
// 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 {