mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-03 13:27:23 +01:00
Fix LegacyPluginLoader dependency registration (#9165)
This commit is contained in:
parent
2da0966452
commit
a4b55ff96a
1 changed files with 7 additions and 0 deletions
|
@ -1867,6 +1867,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ return this.dependencies.contains(pluginIdentifier);
|
||||
+ }
|
||||
+
|
||||
+ // Used by the legacy loader -- this isn't recommended
|
||||
+ public void addDirectDependency(String dependency) {
|
||||
+ this.dependencies.add(dependency);
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public String toString() {
|
||||
+ return "ProviderDependencyTree{" +
|
||||
|
@ -2292,6 +2297,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ PluginMeta configuration = provider.getMeta();
|
||||
+
|
||||
+ PluginProvider<T> replacedProvider = providersToLoad.put(configuration.getName(), provider);
|
||||
+ dependencyTree.addDirectDependency(configuration.getName()); // add to dependency tree
|
||||
+ if (replacedProvider != null) {
|
||||
+ LOGGER.severe(String.format(
|
||||
+ "Ambiguous plugin name `%s' for files `%s' and `%s' in `%s'",
|
||||
|
@ -2324,6 +2330,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ ));
|
||||
+ } else {
|
||||
+ String replacedPlugin = pluginsProvided.put(provided, configuration.getName());
|
||||
+ dependencyTree.addDirectDependency(provided); // add to dependency tree
|
||||
+ if (replacedPlugin != null) {
|
||||
+ LOGGER.warning(String.format(
|
||||
+ "`%s' is provided by both `%s' and `%s'",
|
||||
|
|
Loading…
Add table
Reference in a new issue