mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 12:09:39 +00:00
Fix #2077 Crash from disabling the Arboriculture Module
This commit is contained in:
1 parent
d621d8a5df
commit
36ccd5c3e1
4 files changed
+8
-4
No files matched your search
@@ -22,10 +22,14 @@ public final class ModuleHelper {
|
||||
return isModuleEnabled(Constants.MOD_ID, moduleID);
|
||||
}
|
||||
|
||||
public static boolean isEnabled(String... moduleIDs) {
|
||||
public static boolean allEnabled(String... moduleIDs) {
|
||||
return Stream.of(moduleIDs).allMatch(ModuleHelper::isEnabled);
|
||||
}
|
||||
|
||||
public static boolean anyEnabled(String... moduleIDs) {
|
||||
return Stream.of(moduleIDs).anyMatch(ModuleHelper::isEnabled);
|
||||
}
|
||||
|
||||
public static boolean isModuleEnabled(String containerID, String moduleID){
|
||||
ModuleManager manager = ModuleManager.getInstance();
|
||||
return manager.isModuleEnabled(containerID, moduleID);
|
||||
|
||||
Reference in new issue
Block a user