Вынесен профиль при запуске

This commit is contained in:
Gravit 2018-09-23 16:47:37 +07:00
parent ab17b72285
commit de69eb45a4

View file

@ -171,6 +171,8 @@ public void write(HOutput output) throws IOException {
@LauncherAPI @LauncherAPI
public static String title; public static String title;
@LauncherAPI @LauncherAPI
public static ClientProfile profile;
@LauncherAPI
public static final String SKIN_DIGEST_PROPERTY = "skinDigest"; public static final String SKIN_DIGEST_PROPERTY = "skinDigest";
@LauncherAPI @LauncherAPI
@ -445,7 +447,7 @@ public static void main(String... args) throws Throwable {
Files.delete(paramsFile); Files.delete(paramsFile);
} }
} }
ClientLauncher.profile = profile.object;
title = params.title; title = params.title;
Launcher.modulesManager.initModules(); Launcher.modulesManager.initModules();
// Verify ClientLauncher sign and classpath // Verify ClientLauncher sign and classpath
@ -506,6 +508,7 @@ private static LinkedList<Path> resolveClassPathList(Path clientDir, String... c
@LauncherAPI @LauncherAPI
public static void setProfile(ClientProfile profile) { public static void setProfile(ClientProfile profile) {
ClientLauncher.profile = profile;
ClientLauncher.title = profile.getTitle(); ClientLauncher.title = profile.getTitle();
LogHelper.debug("New Profile name: %s", profile.getTitle()); LogHelper.debug("New Profile name: %s", profile.getTitle());
} }