diff --git a/src/main/java/ftbsc/bscv/system/ModManager.java b/src/main/java/ftbsc/bscv/system/ModManager.java index 2668a79..974142e 100644 --- a/src/main/java/ftbsc/bscv/system/ModManager.java +++ b/src/main/java/ftbsc/bscv/system/ModManager.java @@ -25,6 +25,17 @@ public class ModManager { this.categories = new HashSet<>(); } + + @Nullable + public IModule get(Class clazz) { + for (IModule m : this.mods) { + if (clazz.isAssignableFrom(m.getClass())) { + return m; + } + } + return null; + } + public void load() { for (ILoadable module : ServiceLoader.load(ILoadable.class)) { if(module instanceof IModule) {