summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ftbsc')
-rw-r--r--src/main/java/ftbsc/bscv/system/ModManager.java11
1 files changed, 11 insertions, 0 deletions
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<? extends IModule> 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) {