diff --git a/src/main/java/com/sk89q/util/yaml/YAMLNode.java b/src/main/java/com/sk89q/util/yaml/YAMLNode.java index fea3b104d..c9893c866 100644 --- a/src/main/java/com/sk89q/util/yaml/YAMLNode.java +++ b/src/main/java/com/sk89q/util/yaml/YAMLNode.java @@ -443,6 +443,7 @@ public class YAMLNode { public List getStringList(String path, List def) { List raw = getList(path); if (raw == null) { + if (writeDefaults && def != null) setProperty(path, def); return def != null ? def : new ArrayList(); } @@ -472,6 +473,7 @@ public class YAMLNode { public List getIntList(String path, List def) { List raw = getList(path); if (raw == null) { + if (writeDefaults && def != null) setProperty(path, def); return def != null ? def : new ArrayList(); } @@ -500,6 +502,7 @@ public class YAMLNode { public List getDoubleList(String path, List def) { List raw = getList(path); if (raw == null) { + if (writeDefaults && def != null) setProperty(path, def); return def != null ? def : new ArrayList(); } @@ -528,6 +531,7 @@ public class YAMLNode { public List getBooleanList(String path, List def) { List raw = getList(path); if (raw == null) { + if (writeDefaults && def != null) setProperty(path, def); return def != null ? def : new ArrayList(); } @@ -651,6 +655,7 @@ public class YAMLNode { public List getNodeList(String path, List def) { List raw = getList(path); if (raw == null) { + if (writeDefaults && def != null) setProperty(path, def); return def != null ? def : new ArrayList(); }