diff --git a/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java b/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java index aac8132ba..fcec074df 100644 --- a/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java +++ b/src/main/java/com/sk89q/util/yaml/YAMLProcessor.java @@ -75,6 +75,7 @@ public class YAMLProcessor extends YAMLNode { /* * Map from property key to comment. Comment may have multiple lines that are newline-separated. * Comments support based on ZerothAngel's AnnotatedYAMLConfiguration + * Comments are only supported with YAMLFormat.EXTENDED */ private final Map comments = new HashMap(); @@ -183,7 +184,7 @@ public class YAMLProcessor extends YAMLNode { writer.append(header); writer.append(LINE_BREAK); } - if (comments.size() == 0) { + if (comments.size() == 0 || format != YAMLFormat.EXTENDED) { yaml.dump(root, writer); } else { // Iterate over each root-level property and dump