From c0baa1b44619a139eb149a4265182098b986880a Mon Sep 17 00:00:00 2001 From: fullwall Date: Sun, 27 May 2012 16:48:58 +0800 Subject: [PATCH] This is why you don't use the github web interface --- src/main/java/net/citizensnpcs/Settings.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/citizensnpcs/Settings.java b/src/main/java/net/citizensnpcs/Settings.java index b94badacd..65f39f97a 100644 --- a/src/main/java/net/citizensnpcs/Settings.java +++ b/src/main/java/net/citizensnpcs/Settings.java @@ -9,6 +9,8 @@ import net.citizensnpcs.api.util.Storage; import net.citizensnpcs.api.util.YamlStorage; import net.citizensnpcs.util.Messaging; +import com.google.common.collect.Lists; + public class Settings { private final Storage config; private final DataKey root; @@ -93,7 +95,7 @@ public class Settings { @SuppressWarnings("unchecked") public List asList() { - if (value instanceof String) { + if (!(value instanceof List)) { value = Lists.newArrayList(value); } return (List) value; @@ -110,7 +112,7 @@ public class Settings { protected void set(DataKey root) { root.setRaw(path, value); } - + protected void load(DataKey root) { value = root.getRaw(path); }