Added config to CompatManager to allow disabling of handlers.
This commit is contained in:
parent
741c25a5a2
commit
5821dbfe0e
1 changed files with 7 additions and 0 deletions
|
@ -6,6 +6,7 @@ import techreborn.compat.ee3.EmcValues;
|
|||
import techreborn.compat.minetweaker.MinetweakerCompat;
|
||||
import techreborn.compat.recipes.*;
|
||||
import techreborn.compat.waila.CompatModuleWaila;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
@ -47,6 +48,12 @@ public class CompatManager {
|
|||
}
|
||||
|
||||
public void registerCompact(Class<?> moduleClass, Object... objs) {
|
||||
boolean shouldLoad = ConfigTechReborn.config.get(ConfigTechReborn.CATEGORY_INTEGRATION, "Compat:" + moduleClass.getSimpleName(), true, "Should the " + moduleClass.getSimpleName() + " be loaded?").getBoolean(true);
|
||||
if (ConfigTechReborn.config.hasChanged())
|
||||
ConfigTechReborn.config.save();
|
||||
if(!shouldLoad){
|
||||
return;
|
||||
}
|
||||
for (Object obj : objs) {
|
||||
if (obj instanceof String) {
|
||||
String modid = (String) obj;
|
||||
|
|
Loading…
Add table
Reference in a new issue