diff --git a/src/main/java/com/gmail/nossr50/config/skills/repair/RepairConfig.java b/src/main/java/com/gmail/nossr50/config/skills/repair/RepairConfig.java index c04a98676..848ba8468 100644 --- a/src/main/java/com/gmail/nossr50/config/skills/repair/RepairConfig.java +++ b/src/main/java/com/gmail/nossr50/config/skills/repair/RepairConfig.java @@ -3,6 +3,7 @@ package com.gmail.nossr50.config.skills.repair; import com.gmail.nossr50.config.ConfigLoader; import com.gmail.nossr50.datatypes.skills.ItemType; import com.gmail.nossr50.datatypes.skills.MaterialType; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.skills.repair.repairables.Repairable; import com.gmail.nossr50.skills.repair.repairables.RepairableFactory; import com.gmail.nossr50.util.ItemUtils; @@ -26,6 +27,11 @@ public class RepairConfig extends ConfigLoader { protected void loadKeys() { repairables = new ArrayList(); + if (!config.isConfigurationSection("Repairables")) { + mcMMO.p.getLogger().severe("Could not find Repairables section in " + fileName); + return; + } + ConfigurationSection section = config.getConfigurationSection("Repairables"); Set keys = section.getKeys(false); diff --git a/src/main/java/com/gmail/nossr50/config/skills/salvage/SalvageConfig.java b/src/main/java/com/gmail/nossr50/config/skills/salvage/SalvageConfig.java index 5400ca826..2975e6316 100644 --- a/src/main/java/com/gmail/nossr50/config/skills/salvage/SalvageConfig.java +++ b/src/main/java/com/gmail/nossr50/config/skills/salvage/SalvageConfig.java @@ -3,6 +3,7 @@ package com.gmail.nossr50.config.skills.salvage; import com.gmail.nossr50.config.ConfigLoader; import com.gmail.nossr50.datatypes.skills.ItemType; import com.gmail.nossr50.datatypes.skills.MaterialType; +import com.gmail.nossr50.mcMMO; import com.gmail.nossr50.skills.salvage.salvageables.Salvageable; import com.gmail.nossr50.skills.salvage.salvageables.SalvageableFactory; import com.gmail.nossr50.util.ItemUtils; @@ -27,6 +28,11 @@ public class SalvageConfig extends ConfigLoader { protected void loadKeys() { salvageables = new ArrayList(); + if (!config.isConfigurationSection("Salvageables")) { + mcMMO.p.getLogger().severe("Could not find Salvageables section in " + fileName); + return; + } + ConfigurationSection section = config.getConfigurationSection("Salvageables"); Set keys = section.getKeys(false);