2019-06-02 05:03:08 +03:00
|
|
|
package pro.gravit.launcher.server;
|
2018-09-17 10:07:32 +03:00
|
|
|
|
2019-06-03 10:58:10 +03:00
|
|
|
import pro.gravit.launcher.Launcher;
|
2019-06-02 05:03:08 +03:00
|
|
|
import pro.gravit.launcher.managers.SimpleModulesConfigManager;
|
|
|
|
import pro.gravit.launcher.modules.ModuleContext;
|
|
|
|
import pro.gravit.launcher.modules.ModulesConfigManager;
|
|
|
|
import pro.gravit.launcher.modules.ModulesManager;
|
|
|
|
import pro.gravit.utils.PublicURLClassLoader;
|
2018-09-17 10:07:32 +03:00
|
|
|
|
|
|
|
public class ServerModuleContext implements ModuleContext {
|
2018-09-22 17:22:39 +03:00
|
|
|
public final PublicURLClassLoader classLoader;
|
2018-09-17 10:07:32 +03:00
|
|
|
public final ServerWrapper wrapper;
|
2019-01-18 01:30:55 +03:00
|
|
|
public final SimpleModulesConfigManager modulesConfigManager;
|
2018-09-17 10:07:32 +03:00
|
|
|
|
2019-01-18 01:30:55 +03:00
|
|
|
public ServerModuleContext(ServerWrapper wrapper, PublicURLClassLoader classLoader, SimpleModulesConfigManager modulesConfigManager) {
|
2018-09-17 10:07:32 +03:00
|
|
|
this.classLoader = classLoader;
|
|
|
|
this.wrapper = wrapper;
|
2019-01-12 03:13:24 +03:00
|
|
|
this.modulesConfigManager = modulesConfigManager;
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public Type getType() {
|
|
|
|
return Type.SERVER;
|
|
|
|
}
|
2018-09-19 16:14:50 +03:00
|
|
|
|
|
|
|
@Override
|
2019-01-18 01:30:55 +03:00
|
|
|
public ModulesManager getModulesManager() {
|
2018-09-19 16:14:50 +03:00
|
|
|
return Launcher.modulesManager;
|
|
|
|
}
|
2019-01-12 03:13:24 +03:00
|
|
|
|
|
|
|
@Override
|
2019-01-18 01:30:55 +03:00
|
|
|
public ModulesConfigManager getModulesConfigManager() {
|
2019-01-12 03:13:24 +03:00
|
|
|
return modulesConfigManager;
|
|
|
|
}
|
2018-09-17 10:07:32 +03:00
|
|
|
}
|