mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2024-12-27 05:00:08 +08:00
Only dump with comments if using YAMLFormat.EXTENDED
This commit is contained in:
parent
71fc98ba1c
commit
49678720c6
@ -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<String, String> comments = new HashMap<String, String>();
|
||||
|
||||
@ -183,7 +184,7 @@ public boolean save() {
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user