mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
List all missing hard depends not just first (#5673)
This commit is contained in:
parent
c8fec2dde2
commit
ca3326ac87
1 changed files with 31 additions and 0 deletions
|
@ -0,0 +1,31 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Tue, 18 May 2021 10:38:10 -0700
|
||||
Subject: [PATCH] List all missing hard depends not just first
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
));
|
||||
}
|
||||
|
||||
+ Set<String> missingHardDependencies = new HashSet<>(description.getDepend().size()); // Paper - list all missing hard depends
|
||||
for (final String pluginName : description.getDepend()) {
|
||||
Plugin current = server.getPluginManager().getPlugin(pluginName);
|
||||
|
||||
if (current == null) {
|
||||
- throw new UnknownDependencyException("Unknown dependency " + pluginName + ". Please download and install " + pluginName + " to run this plugin.");
|
||||
+ missingHardDependencies.add(pluginName); // Paper - list all missing hard depends
|
||||
}
|
||||
}
|
||||
+ // Paper start - list all missing hard depends
|
||||
+ if (!missingHardDependencies.isEmpty()) {
|
||||
+ throw new UnknownDependencyException("Unknown dependencies: " + String.join(", ", missingHardDependencies) + " Please download and install these plugins to run this plugin.");
|
||||
+ }
|
||||
+ // Paper end
|
||||
|
||||
server.getUnsafe().checkSupported(description);
|
||||
|
Loading…
Reference in a new issue