mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-03-30 21:18:17 +03:00
Фикс config.bin not found в ServerWrapper
This commit is contained in:
parent
e44264d554
commit
e4b8cf59bf
2 changed files with 6 additions and 0 deletions
|
@ -46,6 +46,7 @@ public static void main(String[] args) throws Throwable {
|
||||||
}
|
}
|
||||||
LauncherConfig cfg = new LauncherConfig(config.address, config.port, SecurityHelper.toPublicRSAKey(IOHelper.read(Paths.get("public.key"))),new HashMap<>(),config.projectname);
|
LauncherConfig cfg = new LauncherConfig(config.address, config.port, SecurityHelper.toPublicRSAKey(IOHelper.read(Paths.get("public.key"))),new HashMap<>(),config.projectname);
|
||||||
ProfilesRequest.Result result = new ProfilesRequest(cfg).request();
|
ProfilesRequest.Result result = new ProfilesRequest(cfg).request();
|
||||||
|
Launcher.setConfig(cfg);
|
||||||
for (SignedObjectHolder<ClientProfile> p : result.profiles) {
|
for (SignedObjectHolder<ClientProfile> p : result.profiles) {
|
||||||
LogHelper.debug("Get profile: %s", p.object.getTitle());
|
LogHelper.debug("Get profile: %s", p.object.getTitle());
|
||||||
if (p.object.getTitle().equals(config.title)) {
|
if (p.object.getTitle().equals(config.title)) {
|
||||||
|
|
|
@ -79,6 +79,11 @@ public static LauncherConfig getConfig() {
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
@LauncherAPI
|
||||||
|
public static void setConfig(LauncherConfig cfg)
|
||||||
|
{
|
||||||
|
CONFIG.set(cfg);
|
||||||
|
}
|
||||||
|
|
||||||
@LauncherAPI
|
@LauncherAPI
|
||||||
public static URL getResourceURL(String name) throws IOException {
|
public static URL getResourceURL(String name) throws IOException {
|
||||||
|
|
Loading…
Reference in a new issue