From 09c7575189492031b8d62d63b5d8606e063e2f09 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Wed, 17 Jun 2020 18:50:45 +1000 Subject: [PATCH] SPIGOT-5783: Add helpful info to UnknownDependencyException By: md_5 --- .../src/main/java/org/bukkit/plugin/SimplePluginManager.java | 2 +- .../src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java index d92a24acff..7f606a2f3b 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -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; } } diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java index cc538f708b..765e880596 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -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."); } }