From f091a321742f3bdfd44c1d2707255eb4b810fd9a Mon Sep 17 00:00:00 2001 From: "main()" Date: Fri, 9 Dec 2011 16:53:50 +0100 Subject: [PATCH] Now saving mob exceptions correctly. Fixes #287 --- .../java/com/onarandombox/MultiverseCore/MVWorld.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java index 01699b83..ae1d0cc9 100644 --- a/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java +++ b/src/main/java/com/onarandombox/MultiverseCore/MVWorld.java @@ -271,9 +271,10 @@ public class MVWorld implements MultiverseWorld { @Override public boolean addToVariable(String property, String value) { + property = property.toLowerCase(); if (this.masterList.keySet().contains(property)) { - if (property.equalsIgnoreCase("animals") || property.equalsIgnoreCase("monsters")) { + if (property.equals("animals") || property.equals("monsters")) { this.masterList.get(property).add(value.toUpperCase()); this.worldSection.set(property.toLowerCase() + ".exceptions", this.masterList.get(property)); this.syncMobs(); @@ -289,15 +290,16 @@ public class MVWorld implements MultiverseWorld { @Override public boolean removeFromVariable(String property, String value) { + property = property.toLowerCase(); if (this.masterList.keySet().contains(property)) { - if (property.equalsIgnoreCase("animals") || property.equalsIgnoreCase("monsters")) { + if (property.equals("animals") || property.equals("monsters")) { this.masterList.get(property).remove(value.toUpperCase()); - this.worldSection.set("" + property.toLowerCase() + ".exceptions", this.masterList.get(property)); + this.worldSection.set(property + ".exceptions", this.masterList.get(property)); this.syncMobs(); } else { this.masterList.get(property).remove(value); - this.worldSection.set("" + property.toLowerCase(), this.masterList.get(property)); + this.worldSection.set(property, this.masterList.get(property)); } saveConfig(); return true;