From 0fc1ae9b1cb227e06fd791d83b1b1e863234ea42 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 27 Jan 2020 10:58:39 +1100 Subject: [PATCH] Fix buggy classloader warning triggering for all classes By: md_5 --- .../main/java/org/bukkit/plugin/java/PluginClassLoader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index 1ae00aa0c0..e561eec1b1 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -106,7 +106,8 @@ final class PluginClassLoader extends URLClassLoader { if (result != null) { JavaPlugin provider = ((PluginClassLoader) result.getClassLoader()).plugin; - if (!description.getDepend().contains(provider.getName()) + if (provider != plugin + && !description.getDepend().contains(provider.getName()) && !description.getSoftDepend().contains(provider.getName()) && !provider.getDescription().getLoadBefore().contains(description.getName())) {