File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
src/main/java/fr/xephi/authme/message/updater Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 22
33import ch .jalu .configme .resource .PropertyReader ;
44import ch .jalu .configme .resource .YamlFileResource ;
5- import org .jetbrains .annotations .NotNull ;
65import org .yaml .snakeyaml .DumperOptions ;
76import org .yaml .snakeyaml .Yaml ;
87
@@ -20,12 +19,12 @@ public MigraterYamlFileResource(File file) {
2019 }
2120
2221 @ Override
23- public @ NotNull PropertyReader createReader () {
22+ public PropertyReader createReader () {
2423 return MessageMigraterPropertyReader .loadFromFile (getFile ());
2524 }
2625
2726 @ Override
28- protected @ NotNull Yaml createNewYaml () {
27+ protected Yaml createNewYaml () {
2928 if (singleQuoteYaml == null ) {
3029 DumperOptions options = new DumperOptions ();
3130 options .setDefaultFlowStyle (DumperOptions .FlowStyle .BLOCK );
@@ -37,4 +36,12 @@ public MigraterYamlFileResource(File file) {
3736 }
3837 return singleQuoteYaml ;
3938 }
39+
40+ // Because we set the YAML object to put strings in single quotes, this method by default uses that YAML object
41+ // and also puts all paths as single quotes. Override to just always return the same string since we know those
42+ // are only message names (so never any conflicting strings like "true" or "0").
43+ @ Override
44+ protected String escapePathElementIfNeeded (String path ) {
45+ return path ;
46+ }
4047}
You can’t perform that action at this time.
0 commit comments