From 6964f7adfcc76a91b4cbf091261c447df3fa6bc6 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Tue, 30 Oct 2012 18:12:50 -0700 Subject: [PATCH] Resolving issue #238. --- .../java/com/gmail/nossr50/config/mods/CustomArmorConfig.java | 4 ++++ .../com/gmail/nossr50/config/mods/CustomBlocksConfig.java | 4 ++++ .../java/com/gmail/nossr50/config/mods/CustomToolsConfig.java | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java index d804147c0..a0d0fd530 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomArmorConfig.java @@ -49,6 +49,10 @@ public class CustomArmorConfig extends ConfigLoader{ private void loadArmor(String armorType, List idList) { ConfigurationSection armorSection = config.getConfigurationSection(armorType); + + if(armorSection == null) + return; + Set armorConfigSet = armorSection.getKeys(false); Iterator iterator = armorConfigSet.iterator(); diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java index 9f3c7e958..d58db8684 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomBlocksConfig.java @@ -48,6 +48,10 @@ public class CustomBlocksConfig extends ConfigLoader { private void loadBlocks(String skillType, List blockList) { ConfigurationSection skillSection = config.getConfigurationSection(skillType); + + if(skillSection == null) + return; + Set skillConfigSet = skillSection.getKeys(false); Iterator iterator = skillConfigSet.iterator(); diff --git a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java index a32960f90..e0b3f5d7a 100644 --- a/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java +++ b/src/main/java/com/gmail/nossr50/config/mods/CustomToolsConfig.java @@ -53,6 +53,10 @@ public class CustomToolsConfig extends ConfigLoader { private void loadTool(String toolType, List idList) { ConfigurationSection toolSection = config.getConfigurationSection(toolType); + + if(toolSection == null) + return; + Set toolConfigSet = toolSection.getKeys(false); Iterator iterator = toolConfigSet.iterator();