Фикс config.bin not found в ServerWrapper

This commit is contained in:
Gravit 2018-09-26 15:54:14 +07:00
parent e44264d554
commit e4b8cf59bf
2 changed files with 6 additions and 0 deletions

View file

@ -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)) {

View file

@ -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 {