diff --git a/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java index bc8581b..000ad42 100644 --- a/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java +++ b/Loader/src/main/java/de/com/baseband/launcher/classloader/CustomClassLoader.java @@ -17,6 +17,7 @@ import java.lang.reflect.Field; import java.lang.reflect.Method; import java.net.MalformedURLException; import java.net.URL; +import java.util.Arrays; import java.util.HashSet; import java.util.Map; @@ -67,7 +68,7 @@ public class CustomClassLoader extends ClassLoader implements Util { throw new IllegalStateException(MixinService.getService().getClass().toString()); } - Method m = Class.forName("java.lang.ClassLoader.ParallelLoaders").getDeclaredMethod("register", Class.class); + Method m = Arrays.stream(Class.forName("java.lang.ClassLoader").getDeclaredClasses()).filter(x -> x.getSimpleName().equalsIgnoreCase("ParallelLoaders")).findFirst().get().getDeclaredMethod("register", Class.class); m.setAccessible(true); m.invoke(null, CustomClassLoader.class);