aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0329-Fix-plugin-provides-load-order.patch
blob: 83c8568dff40c23c952b5cf27b8a7de7787a03d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
index c57a59d337a41c083e88e36637d839db027b9289..1366496271c4c7f72d1e5f990e51775b1c371f99 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -281,6 +281,7 @@ 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);
 
@@ -314,6 +315,7 @@ 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 {