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 c17064d5..0e07b07d 100644 --- a/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java +++ b/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerWrapper.java @@ -128,6 +128,11 @@ public void run(String... args) throws Throwable { LogHelper.error(e); } }; + if(config.properties != null) { + for(Map.Entry e : config.properties.entrySet()) { + System.setProperty(e.getKey(), e.getValue()); + } + } Request.setRequestService(service); if (config.logFile != null) LogHelper.addOutput(IOHelper.newWriter(Paths.get(config.logFile), true)); { @@ -213,6 +218,7 @@ public Config getDefaultConfig() { newConfig.address = "ws://localhost:9274/api"; newConfig.classLoaderConfig = ClientProfile.ClassLoaderConfig.SYSTEM_ARGS; newConfig.env = LauncherConfig.LauncherEnvironment.STD; + newConfig.properties = new HashMap<>(); return newConfig; } @@ -238,6 +244,8 @@ public static final class Config { public byte[] encodedServerRsaPublicKey; public byte[] encodedServerEcPublicKey; + + public Map properties; } public static final class ModuleConf {