diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/api/AuthService.java b/LauncherAPI/src/main/java/pro/gravit/launcher/api/AuthService.java index 0020d954..e96152a3 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/api/AuthService.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/api/AuthService.java @@ -7,6 +7,7 @@ import java.util.UUID; public class AuthService { + public static String projectName; public static String username; public static ClientPermissions permissions = new ClientPermissions(); public static UUID uuid; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java index 15436bd5..81069f83 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java @@ -177,6 +177,7 @@ private static void realMain(String[] args) throws Throwable { String glfwPath = ClientService.findLibrary("glfw_wayland"); System.setProperty("org.lwjgl.glfw.libname", glfwPath); } + AuthService.projectName = Launcher.getConfig().projectName; AuthService.username = params.playerProfile.username; AuthService.uuid = params.playerProfile.uuid; KeyService.serverRsaPublicKey = Launcher.getConfig().rsaPublicKey; 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 4b82b2a3..03466718 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -27,6 +27,7 @@ import pro.gravit.utils.helper.SecurityHelper; import pro.gravit.utils.launch.*; +import java.io.File; import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; @@ -186,9 +187,11 @@ public void run(String... args) throws Throwable { switch (config.classLoaderConfig) { case LAUNCHER: launch = new LegacyLaunch(); + System.setProperty("java.class.path", String.join(File.pathSeparator, config.classpath)); break; case MODULE: launch = new ModuleLaunch(); + System.setProperty("java.class.path", String.join(File.pathSeparator, config.classpath)); break; default: if(ServerAgent.isAgentStarted()) { @@ -213,7 +216,6 @@ public void run(String... args) throws Throwable { config.configServiceSettings.apply(); } LogHelper.info("Start Minecraft Server"); - LogHelper.debug("Invoke main method %s with %s", classname, launch.getClass().getName()); try { if(config.compatClasses != null) { for (String e : config.compatClasses) { @@ -222,6 +224,7 @@ public void run(String... args) throws Throwable { runMethod.invoke(classLoaderControl); } } + LogHelper.debug("Invoke main method %s with %s", classname, launch.getClass().getName()); launch.launch(config.mainclass, config.mainmodule, Arrays.asList(real_args)); } catch (Throwable e) { LogHelper.error(e);