Инициализация Reconfigurable при старте лаунчсервера

This commit is contained in:
Gravit 2018-12-26 19:54:04 +07:00
parent c64d3b1f42
commit 56e5874205
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -394,6 +394,27 @@ public LaunchServer(Path dir) throws IOException, InvalidKeySpecException {
}
});
if(config.permissionsHandler instanceof Reconfigurable)
reconfigurableManager.registerReconfigurable("permissionsHandler",(Reconfigurable) config.permissionsHandler);
if(config.authHandler instanceof Reconfigurable)
reconfigurableManager.registerReconfigurable("authHandler",(Reconfigurable) config.authHandler);
for(int i=0;i<config.authProvider.length;++i)
{
AuthProvider provider = config.authProvider[i];
if(provider instanceof Reconfigurable)
reconfigurableManager.registerReconfigurable("authHandler".concat(String.valueOf(i)),(Reconfigurable) provider);
}
if(config.textureProvider instanceof Reconfigurable)
reconfigurableManager.registerReconfigurable("textureProvider",(Reconfigurable) config.textureProvider);
Arrays.stream(config.mirrors).forEach(s -> {
try {
mirrorManager.addMirror(s);
} catch (MalformedURLException e) {
e.printStackTrace();
}
});
// init modules
modulesManager.initModules();