mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-31 22:22:49 +00:00
Reverted classloader changes by 1f0d89be27, now actually works! Again!
This commit is contained in:
parent
0b35cd8127
commit
d733a32f7c
1 changed files with 7 additions and 15 deletions
|
@ -24,25 +24,17 @@ public class PluginClassLoader extends URLClassLoader {
|
|||
Class<?> result = classes.get(name);
|
||||
|
||||
if (result == null) {
|
||||
ClassNotFoundException ex = null;
|
||||
result = loader.getClassByName(name);
|
||||
|
||||
try {
|
||||
if (result == null) {
|
||||
result = super.findClass(name);
|
||||
} catch (ClassNotFoundException e) {
|
||||
ex = e;
|
||||
|
||||
if (result != null) {
|
||||
loader.setClass(name, result);
|
||||
}
|
||||
}
|
||||
|
||||
if (result != null) {
|
||||
loader.setClass(name, result);
|
||||
} else {
|
||||
result = loader.getClassByName(name);
|
||||
}
|
||||
|
||||
if (result != null ) {
|
||||
classes.put(name, result);
|
||||
} else {
|
||||
throw ex;
|
||||
}
|
||||
classes.put(name, result);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue