From 326012aad8df2f04d98814e489a9231a3987bd97 Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 27 Sep 2020 00:52:43 +0700 Subject: [PATCH] [FIX] optionalClientArgs --- .../gravit/launcher/client/ClientLauncherEntryPoint.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java index 9c5cc9b6..b4d8550f 100644 --- a/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java +++ b/Launcher/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java @@ -16,6 +16,7 @@ import pro.gravit.launcher.profiles.ClientProfile; import pro.gravit.launcher.profiles.optional.actions.OptionalAction; import pro.gravit.launcher.profiles.optional.actions.OptionalActionClassPath; +import pro.gravit.launcher.profiles.optional.actions.OptionalActionClientArgs; import pro.gravit.launcher.request.Request; import pro.gravit.launcher.request.RequestException; import pro.gravit.launcher.request.auth.AuthRequest; @@ -237,7 +238,12 @@ private static void launch(ClientProfile profile, ClientLauncherProcess.ClientPa System.setProperty("minecraft.applet.TargetDirectory", params.clientDir); } Collections.addAll(args, profile.getClientArgs()); - profile.pushOptionalClientArgs(args); + for(OptionalAction action : params.actions) { + if(action instanceof OptionalActionClientArgs) + { + args.addAll(((OptionalActionClientArgs) action).args); + } + } List copy = new ArrayList<>(args); for (int i = 0, l = copy.size(); i < l; i++) { String s = copy.get(i);