mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-06 00:07:56 +01:00
Fix bad merge of SPIGOT-6502 fix
By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
66524269f9
commit
f034b5f0c2
@ -116,8 +116,9 @@ final class PluginClassLoader extends URLClassLoader {
|
|||||||
// This ignores the libraries of other plugins, unless they are transitive dependencies.
|
// This ignores the libraries of other plugins, unless they are transitive dependencies.
|
||||||
Class<?> result = loader.getClassByName(name, resolve, description);
|
Class<?> result = loader.getClassByName(name, resolve, description);
|
||||||
|
|
||||||
|
if (result != null) {
|
||||||
// If the class was loaded from a library instead of a PluginClassLoader, we can assume that its associated plugin is a transitive dependency and can therefore skip this check.
|
// If the class was loaded from a library instead of a PluginClassLoader, we can assume that its associated plugin is a transitive dependency and can therefore skip this check.
|
||||||
if (result != null && result.getClassLoader() instanceof PluginClassLoader) {
|
if (result.getClassLoader() instanceof PluginClassLoader) {
|
||||||
PluginDescriptionFile provider = ((PluginClassLoader) result.getClassLoader()).description;
|
PluginDescriptionFile provider = ((PluginClassLoader) result.getClassLoader()).description;
|
||||||
|
|
||||||
if (provider != description
|
if (provider != description
|
||||||
@ -132,6 +133,7 @@ final class PluginClassLoader extends URLClassLoader {
|
|||||||
loader.server.getLogger().log(Level.WARNING, "[{0}] Loaded class {1} from {2} which is not a depend, softdepend or loadbefore of this plugin.", new Object[]{description.getName(), name, provider.getFullName()});
|
loader.server.getLogger().log(Level.WARNING, "[{0}] Loaded class {1} from {2} which is not a depend, softdepend or loadbefore of this plugin.", new Object[]{description.getName(), name, provider.getFullName()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user