[FIX] Client start hotfix

This commit is contained in:
Gravita 2021-11-17 01:00:31 +07:00
parent 4dc79f320d
commit d995b3508c
2 changed files with 3 additions and 2 deletions

View file

@ -125,8 +125,10 @@ public static void main(String[] args) throws Throwable {
RequestService service; RequestService service;
if(params.offlineMode) { if(params.offlineMode) {
service = initOffline(LauncherEngine.modulesManager, params); service = initOffline(LauncherEngine.modulesManager, params);
Request.setRequestService(service);
} else { } else {
service = StdWebSocketService.initWebSockets(Launcher.getConfig().address).get(); service = StdWebSocketService.initWebSockets(Launcher.getConfig().address).get();
Request.setRequestService(service);
LogHelper.debug("Restore sessions"); LogHelper.debug("Restore sessions");
Request.restore(); Request.restore();
service.registerEventHandler(new BasicLauncherEventHandler()); service.registerEventHandler(new BasicLauncherEventHandler());
@ -141,7 +143,6 @@ public static void main(String[] args) throws Throwable {
} }
}; };
} }
Request.setRequestService(service);
ClientProfile.ClassLoaderConfig classLoaderConfig = profile.getClassLoaderConfig(); ClientProfile.ClassLoaderConfig classLoaderConfig = profile.getClassLoaderConfig();
if (classLoaderConfig == ClientProfile.ClassLoaderConfig.LAUNCHER) { if (classLoaderConfig == ClientProfile.ClassLoaderConfig.LAUNCHER) {
ClientClassLoader classLoader = new ClientClassLoader(classpath.toArray(new URL[0]), ClassLoader.getSystemClassLoader()); ClientClassLoader classLoader = new ClientClassLoader(classpath.toArray(new URL[0]), ClassLoader.getSystemClassLoader());

View file

@ -5,7 +5,7 @@
id 'org.openjfx.javafxplugin' version '0.0.10' apply false id 'org.openjfx.javafxplugin' version '0.0.10' apply false
} }
group = 'pro.gravit.launcher' group = 'pro.gravit.launcher'
version = '5.2.6' version = '5.2.6 '
apply from: 'props.gradle' apply from: 'props.gradle'