Launcher/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientModuleManager.java

46 lines
1.2 KiB
Java

package pro.gravit.launcher.client;
import pro.gravit.launcher.base.Launcher;
import pro.gravit.launcher.core.LauncherTrustManager;
import pro.gravit.launcher.base.modules.LauncherModule;
import pro.gravit.launcher.base.modules.impl.SimpleModuleManager;
import java.net.URL;
import java.nio.file.Path;
import java.util.Collections;
import java.util.List;
public final class ClientModuleManager extends SimpleModuleManager {
public ClientModuleManager() {
super(null, null, Launcher.getConfig().trustManager);
}
@Override
public void autoload() {
throw new UnsupportedOperationException();
}
@Override
public void autoload(Path dir) {
throw new UnsupportedOperationException();
}
@Override
public LauncherModule loadModule(LauncherModule module) {
return super.loadModule(module);
}
public List<LauncherModule> getModules() {
return Collections.unmodifiableList(modules);
}
@Override
protected ModulesClassLoader createClassLoader() {
return null;
}
@Override
public boolean verifyClassCheckResult(LauncherTrustManager.CheckClassResult result) {
return result.type == LauncherTrustManager.CheckClassResultType.SUCCESS;
}
}