mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-02 17:32:03 +01:00
Reverted classloader changes by 1f0d89be27, now actually works! Again!
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
bfad019c31
commit
97f4798d51
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…
Reference in a new issue