Launcher/ServerWrapper/src/main/java/pro/gravit/launcher/server/ServerModuleContext.java
2019-06-03 11:00:46 +03:00

35 lines
1.1 KiB
Java

package pro.gravit.launcher.server;
import pro.gravit.launcher.Launcher;
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;
public class ServerModuleContext implements ModuleContext {
public final PublicURLClassLoader classLoader;
public final ServerWrapper wrapper;
public final SimpleModulesConfigManager modulesConfigManager;
public ServerModuleContext(ServerWrapper wrapper, PublicURLClassLoader classLoader, SimpleModulesConfigManager modulesConfigManager) {
this.classLoader = classLoader;
this.wrapper = wrapper;
this.modulesConfigManager = modulesConfigManager;
}
@Override
public Type getType() {
return Type.SERVER;
}
@Override
public ModulesManager getModulesManager() {
return Launcher.modulesManager;
}
@Override
public ModulesConfigManager getModulesConfigManager() {
return modulesConfigManager;
}
}