SPIGOT-5783: Add helpful info to UnknownDependencyException

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot 2020-06-17 18:50:45 +10:00
parent 40d09ae808
commit 09c7575189
2 changed files with 2 additions and 2 deletions

View file

@ -266,7 +266,7 @@ public final class SimplePluginManager implements PluginManager {
server.getLogger().log(
Level.SEVERE,
"Could not load '" + entry.getValue().getPath() + "' in folder '" + directory.getPath() + "'",
new UnknownDependencyException(dependency));
new UnknownDependencyException("Unknown dependency " + dependency + ". Please download and install " + dependency + " to run this plugin."));
break;
}
}

View file

@ -122,7 +122,7 @@ public final class JavaPluginLoader implements PluginLoader {
Plugin current = server.getPluginManager().getPlugin(pluginName);
if (current == null) {
throw new UnknownDependencyException(pluginName);
throw new UnknownDependencyException("Unknown dependency " + pluginName + ". Please download and install " + pluginName + " to run this plugin.");
}
}