package pro.gravit.launcher.modules; import pro.gravit.utils.Version; import java.util.function.Predicate; public interface LauncherModulesManager { LauncherModule loadModule(LauncherModule module); LauncherModule getModule(String name); default boolean containsModule(String name) { return getModule(name) != null; } default boolean containsModule(Class clazz) { return getModule(clazz) != null; } ClassLoader getModuleClassLoader(); T getModule(Class clazz); T findModule(Class clazz, Predicate versionPredicate); LauncherModule.EventAction invokeEvent(T event) throws Exception; }