Fix merge
This commit is contained in:
parent
c880298e5d
commit
3da21bc4f4
@ -2,6 +2,7 @@ package fr.xephi.authme.message.updater;
|
|||||||
|
|
||||||
import ch.jalu.configme.resource.PropertyReader;
|
import ch.jalu.configme.resource.PropertyReader;
|
||||||
import ch.jalu.configme.resource.YamlFileResource;
|
import ch.jalu.configme.resource.YamlFileResource;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.yaml.snakeyaml.DumperOptions;
|
import org.yaml.snakeyaml.DumperOptions;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
|
|
||||||
@ -19,12 +20,12 @@ public class MigraterYamlFileResource extends YamlFileResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PropertyReader createReader() {
|
public @NotNull PropertyReader createReader() {
|
||||||
return MessageMigraterPropertyReader.loadFromFile(getFile());
|
return MessageMigraterPropertyReader.loadFromFile(getFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Yaml createNewYaml() {
|
protected @NotNull Yaml createNewYaml() {
|
||||||
if (singleQuoteYaml == null) {
|
if (singleQuoteYaml == null) {
|
||||||
DumperOptions options = new DumperOptions();
|
DumperOptions options = new DumperOptions();
|
||||||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||||
@ -36,12 +37,4 @@ public class MigraterYamlFileResource extends YamlFileResource {
|
|||||||
}
|
}
|
||||||
return singleQuoteYaml;
|
return singleQuoteYaml;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Because we set the YAML object to put strings in single quotes, this method by default uses that YAML object
|
|
||||||
// and also puts all paths as single quotes. Override to just always return the same string since we know those
|
|
||||||
// are only message names (so never any conflicting strings like "true" or "0").
|
|
||||||
@Override
|
|
||||||
protected String escapePathElementIfNeeded(String path) {
|
|
||||||
return path;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user