Fixed Possible config updrade NPE

This commit is contained in:
Jascha Starke 2013-07-26 18:21:26 +02:00
parent 3cc2d3999f
commit 54a0eb2224
2 changed files with 2 additions and 2 deletions

View file

@ -96,7 +96,7 @@
<!-- http://dl.bukkit.org/ --> <!-- http://dl.bukkit.org/ -->
<groupId>org.bukkit</groupId> <groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId> <artifactId>bukkit</artifactId>
<version>1.6.1-R0.1-SNAPSHOT</version> <version>1.6.2-R0.1-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View file

@ -33,7 +33,7 @@ public class ArmoryConfig extends Configuration implements IConfigurationSubGrou
public void setValues(ConfigurationSection sect) { public void setValues(ConfigurationSection sect) {
if (sect == null || sect.getValues(false).size() == 0) { if (sect == null || sect.getValues(false).size() == 0) {
ConfigurationSection parent_sect = mod.getConfig().getValues(); 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)); sect = parent_sect.createSection(this.getName(), parent_sect.getConfigurationSection("armor").getValues(true));
} }
} }