From 54a0eb2224004e47d0073a0b3a143531ce380258 Mon Sep 17 00:00:00 2001 From: Jascha Starke Date: Fri, 26 Jul 2013 18:21:26 +0200 Subject: [PATCH] Fixed Possible config updrade NPE --- pom.xml | 2 +- .../minecraft/limitedcreative/inventories/ArmoryConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5bf035e..013b4d6 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ org.bukkit bukkit - 1.6.1-R0.1-SNAPSHOT + 1.6.2-R0.1-SNAPSHOT diff --git a/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/ArmoryConfig.java b/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/ArmoryConfig.java index d9d9928..2fd41f9 100644 --- a/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/ArmoryConfig.java +++ b/src/main/java/de/jaschastarke/minecraft/limitedcreative/inventories/ArmoryConfig.java @@ -33,7 +33,7 @@ public class ArmoryConfig extends Configuration implements IConfigurationSubGrou public void setValues(ConfigurationSection sect) { if (sect == null || sect.getValues(false).size() == 0) { ConfigurationSection parent_sect = mod.getConfig().getValues(); - if (parent_sect.contains("armor")) { + if (parent_sect.contains("armore") && parent_sect.isConfigurationSection("armor")) { sect = parent_sect.createSection(this.getName(), parent_sect.getConfigurationSection("armor").getValues(true)); } }