Fix NPE in setclass command.

This commit is contained in:
garbagemule 2013-08-31 05:58:55 +02:00
parent 8ea4799b42
commit 354784269e
2 changed files with 3 additions and 2 deletions

View File

@ -1,7 +1,7 @@
name: MobArena
author: garbagemule
main: com.garbagemule.MobArena.MobArena
version: 0.95.5.30
version: 0.95.5.31
softdepend: [Multiverse-Core,Towny,Heroes,MagicSpells,Vault]
commands:
ma:

View File

@ -383,8 +383,9 @@ public class ArenaMasterImpl implements ArenaMaster
// Create the node.
config.set(path, "");
// Grab the section.
// Grab the section, create if missing
ConfigurationSection section = config.getConfigurationSection(path);
if (section == null) section = config.createSection(path);
// Take the current items and armor.
section.set("items", ItemParser.parseString(inv.getContents()));