diff --git a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfigManager.java b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfigManager.java index 9ef30978..c6a81030 100644 --- a/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfigManager.java +++ b/NCPCore/src/main/java/fr/neatmonster/nocheatplus/config/ConfigManager.java @@ -281,6 +281,20 @@ public class ConfigManager { ConfigManager.worldsMap = newWorldsMap; } + /** + * Check if any config has a boolean set to true for the given path. + * @param path + * @return True if any config has a boolean set to true for the given path. + */ + public static boolean isTrueForAnyConfig(String path) { + for (final ConfigFile cfg : worldsMap.values()){ + if (cfg.getBoolean(path, false)) { + return true; + } + } + return false; + } + /** * Get the maximally found number for the given config path. This does not throw errors. It will return null, if nothing is found or all lookups failed otherwise. *