[BugFix] Failed to invoke entry method

This commit is contained in:
xiaozhou233 committed 2026-01-18 20:43:31 +08:00
1 parent b237af632e
commit f3a2835e2b
1 file changed
+3 -1
@@ -36,7 +36,9 @@ public class Loader {
// Start OrangeX
try {
Class<?> orangeXClass = Class.forName("cn.xiaozhou233.orangex.OrangeX", true, minecraftClassLoader);
orangeXClass.getMethod("start").invoke(null);
Object orangeXInstance = orangeXClass.getDeclaredConstructor().newInstance();
orangeXClass.getMethod("start").invoke(orangeXInstance);
} catch (Exception e) {
throw new RuntimeException(e);
}