diff options
-rw-r--r-- | src/main/java/org/bukkit/configuration/MemorySection.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/configuration/MemorySection.java b/src/main/java/org/bukkit/configuration/MemorySection.java index 3b92c644..1f4c8ce4 100644 --- a/src/main/java/org/bukkit/configuration/MemorySection.java +++ b/src/main/java/org/bukkit/configuration/MemorySection.java @@ -180,6 +180,10 @@ public class MemorySection implements ConfigurationSection { String node = path.substring(i2, i1); ConfigurationSection subSection = section.getConfigurationSection(node); if (subSection == null) { + if (value == null) { + // no need to create missing sub-sections if we want to remove the value: + return; + } section = section.createSection(node); } else { section = subSection; |