mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Check the local extension for the class before expanding the search
This commit is contained in:
parent
aa5e2e9cac
commit
b48d4a0625
1 changed files with 4 additions and 6 deletions
|
@ -82,15 +82,13 @@ public class GeyserExtensionClassLoader extends URLClassLoader {
|
||||||
|
|
||||||
Class<?> result = this.classes.get(name);
|
Class<?> result = this.classes.get(name);
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
if (checkGlobal) {
|
result = super.findClass(name);
|
||||||
|
if (result == null && checkGlobal) {
|
||||||
result = this.loader.classByName(name);
|
result = this.loader.classByName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result == null) {
|
if (result != null) {
|
||||||
result = super.findClass(name);
|
this.loader.setClass(name, result);
|
||||||
if (result != null) {
|
|
||||||
this.loader.setClass(name, result);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.classes.put(name, result);
|
this.classes.put(name, result);
|
||||||
|
|
Loading…
Reference in a new issue