mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00: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.
|
* Map from property key to comment. Comment may have multiple lines that are newline-separated.
|
||||||
* Comments support based on ZerothAngel's AnnotatedYAMLConfiguration
|
* Comments support based on ZerothAngel's AnnotatedYAMLConfiguration
|
||||||
|
* Comments are only supported with YAMLFormat.EXTENDED
|
||||||
*/
|
*/
|
||||||
private final Map<String, String> comments = new HashMap<String, String>();
|
private final Map<String, String> comments = new HashMap<String, String>();
|
||||||
|
|
||||||
@ -183,7 +184,7 @@ public class YAMLProcessor extends YAMLNode {
|
|||||||
writer.append(header);
|
writer.append(header);
|
||||||
writer.append(LINE_BREAK);
|
writer.append(LINE_BREAK);
|
||||||
}
|
}
|
||||||
if (comments.size() == 0) {
|
if (comments.size() == 0 || format != YAMLFormat.EXTENDED) {
|
||||||
yaml.dump(root, writer);
|
yaml.dump(root, writer);
|
||||||
} else {
|
} else {
|
||||||
// Iterate over each root-level property and dump
|
// Iterate over each root-level property and dump
|
||||||
|
Loading…
Reference in New Issue
Block a user