Permalink
Browse files

This is why you don't use the github web interface

  • Loading branch information...
fullwall
fullwall committed May 27, 2012
1 parent 735afe2 commit 4144953dffdb2870f80a645561664294374eab3e
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/net/citizensnpcs/Settings.java
@@ -9,6 +9,8 @@
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 int asInt() {
@SuppressWarnings("unchecked")
public List<String> asList() {
- if (value instanceof String) {
+ if (!(value instanceof List)) {
value = Lists.newArrayList(value);
}
return (List<String>) value;
@@ -110,7 +112,7 @@ public String asString() {
protected void set(DataKey root) {
root.setRaw(path, value);
}
-
+
protected void load(DataKey root) {
value = root.getRaw(path);
}

0 comments on commit 4144953

Please sign in to comment.