From d99f24c3892859b7310aecdaab242019bc694064 Mon Sep 17 00:00:00 2001 From: Gravita Date: Sat, 16 Oct 2021 00:38:52 +0700 Subject: [PATCH] [FIX] Invoke mainclass for non-vargs main method --- .../main/java/pro/gravit/launcher/server/ServerWrapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java index 82b74c86..b775aa40 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -174,9 +174,9 @@ public void run(String... args) throws Throwable { System.arraycopy(args, 1, real_args, 0, args.length - 1); } else real_args = args; - mainMethod.invokeWithArguments(real_args); + mainMethod.invoke(real_args); } else { - mainMethod.invokeWithArguments(config.args.toArray(new String[0])); + mainMethod.invoke(config.args.toArray(new String[0])); } }