2021-10-01 10:53:24 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-08-01 14:01:20 +00:00
|
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
2021-10-01 10:53:24 +00:00
|
|
|
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
|
2023-02-19 14:57:10 +00:00
|
|
|
index 2b8308989fce7f8a16907f8711b362e671fdbfb6..758faf990ba96cbcd0203e9184bcad234b4cb728 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
|
2023-02-19 14:57:10 +00:00
|
|
|
@@ -283,6 +283,7 @@ public final class SimplePluginManager implements PluginManager {
|
|
|
|
} else if (!plugins.containsKey(dependency) && !pluginsProvided.containsKey(dependency)) {
|
2021-10-01 10:53:24 +00:00
|
|
|
missingDependency = false;
|
|
|
|
pluginIterator.remove();
|
|
|
|
+ pluginsProvided.values().removeIf(s -> s.equals(plugin)); // Paper - remove provided plugins
|
|
|
|
softDependencies.remove(plugin);
|
|
|
|
dependencies.remove(plugin);
|
|
|
|
|
2023-02-19 14:57:10 +00:00
|
|
|
@@ -318,6 +319,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 {
|