[FIX] optionalClientArgs

This commit is contained in:
Gravit 2020-09-27 00:52:43 +07:00
parent ef3fbaef18
commit 326012aad8
No known key found for this signature in database
GPG key ID: 98A079490768CCE5

View file

@ -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<String> copy = new ArrayList<>(args);
for (int i = 0, l = copy.size(); i < l; i++) {
String s = copy.get(i);