[FIX] Небольшая чистка кода ClientLauncher.

This commit is contained in:
Zaxar163 2019-11-29 18:20:02 +01:00
parent 358e92ad9e
commit 9456c45a3d
No known key found for this signature in database
GPG key ID: 1FE4F2E1F053831B

View file

@ -348,14 +348,14 @@ public static Process launch(
// Add classpath and main class // Add classpath and main class
String pathLauncher = IOHelper.getCodeSource(ClientLauncher.class).toString(); String pathLauncher = IOHelper.getCodeSource(ClientLauncher.class).toString();
context.pathLauncher = pathLauncher; context.pathLauncher = pathLauncher;
Collections.addAll(context.args, ClientLauncherWrapper.MAGIC_ARG); context.args.add(ClientLauncherWrapper.MAGIC_ARG);
Collections.addAll(context.args, profile.getJvmArgs()); Collections.addAll(context.args, profile.getJvmArgs());
profile.pushOptionalJvmArgs(context.args); profile.pushOptionalJvmArgs(context.args);
Collections.addAll(context.args, "-Djava.library.path=".concat(params.clientDir.resolve(NATIVES_DIR).toString())); // Add Native Path context.args.add("-Djava.library.path=".concat(params.clientDir.resolve(NATIVES_DIR).toString())); // Add Native Path
Collections.addAll(context.args, "-javaagent:".concat(pathLauncher)); context.args.add("-javaagent:".concat(pathLauncher));
ClientHookManager.clientLaunchHook.hook(context); ClientHookManager.clientLaunchHook.hook(context);
LauncherGuardManager.guard.addCustomParams(context); LauncherGuardManager.guard.addCustomParams(context);
Collections.addAll(context.args, ClientLauncher.class.getName()); context.args.add(ClientLauncher.class.getName());
ClientHookManager.clientLaunchFinallyHook.hook(context); ClientHookManager.clientLaunchFinallyHook.hook(context);
// Print commandline debug message // Print commandline debug message