From 8b396dfb13bac820648690cd5bd14ede74d2b9e2 Mon Sep 17 00:00:00 2001 From: Gravita Date: Thu, 14 Oct 2021 20:54:44 +0700 Subject: [PATCH] [ANY] Bug fixes --- .../main/java/pro/gravit/launcher/server/ServerWrapper.java | 5 +++-- 1 file changed, 3 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 55e8d8c4..82b74c86 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -93,6 +93,7 @@ public ProfilesRequestEvent getProfiles() throws Exception { return result; } + @SuppressWarnings("ConfusingArgumentToVarargsMethod") public void run(String... args) throws Throwable { initGson(); AuthRequest.registerProviders(); @@ -173,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.invoke((Object) real_args); + mainMethod.invokeWithArguments(real_args); } else { - mainMethod.invoke((Object) config.args.toArray(new String[0])); + mainMethod.invokeWithArguments(config.args.toArray(new String[0])); } }