Test another fix

This commit is contained in:
Zontreck 2024-02-13 01:26:17 -07:00
parent 2052afaee0
commit 0fd90a8ff4

View file

@ -102,10 +102,11 @@ public class EventDispatcher
{ {
try{ try{
String packageName = pkg.getName(); String packageName = pkg.getName();
Field classesField = classLoader.getClass().getDeclaredField("classes");
classesField.setAccessible(true);
List<Class<?>> classes = (List<Class<?>>) classesField.get(classLoader); var clField = classLoader.getClass().getDeclaredField("classes");
clField.setAccessible(true);
List<Class<?>> classes = (List<Class<?>>) clField.get(classLoader);
for(Class<?> clazz : classes) for(Class<?> clazz : classes)
{ {