diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java index 75cf6e333..68157dd4b 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginClassloader.java @@ -63,7 +63,13 @@ final class PluginClassloader extends URLClassLoader { try { - return super.loadClass( name, resolve ); + Class result = super.loadClass( name, resolve ); + + // SPIGOT-6749: Library classes will appear in the above, but we don't want to return them to other plugins + if ( checkOther || result.getClassLoader() == this ) + { + return result; + } } catch ( ClassNotFoundException ex ) { }