diff --git a/api/src/main/java/net/momirealms/customcrops/api/core/ConfigManager.java b/api/src/main/java/net/momirealms/customcrops/api/core/ConfigManager.java index b3a36f8..283978d 100644 --- a/api/src/main/java/net/momirealms/customcrops/api/core/ConfigManager.java +++ b/api/src/main/java/net/momirealms/customcrops/api/core/ConfigManager.java @@ -372,14 +372,16 @@ public abstract class ConfigManager implements ConfigLoader, Reloadable { public HashMap> getFertilizedPotMap(Section section) { HashMap> map = new HashMap<>(); if (section != null) { - for (Map.Entry entry : section.getStringRouteMappedValues(false).entrySet()) { - if (entry.getValue() instanceof Section innerSection) { - FertilizerType type = Registries.FERTILIZER_TYPE.get(entry.getKey().replace("-", "_")); - if (type != null) { - map.put(type, Pair.of( - Preconditions.checkNotNull(innerSection.getString("dry"), entry.getKey() + ".dry should not be null"), - Preconditions.checkNotNull(innerSection.getString("wet"), entry.getKey() + ".wet should not be null") - )); + if (section.getBoolean("enable")) { + for (Map.Entry entry : section.getStringRouteMappedValues(false).entrySet()) { + if (entry.getValue() instanceof Section innerSection) { + FertilizerType type = Registries.FERTILIZER_TYPE.get(entry.getKey().replace("-", "_")); + if (type != null) { + map.put(type, Pair.of( + Preconditions.checkNotNull(innerSection.getString("dry"), entry.getKey() + ".dry should not be null"), + Preconditions.checkNotNull(innerSection.getString("wet"), entry.getKey() + ".wet should not be null") + )); + } } } }