mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-13 06:15:09 +01:00
yaml ctors
This commit is contained in:
parent
4a26e306b6
commit
c0cbe27efc
@ -41,6 +41,7 @@
|
||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||
import org.yaml.snakeyaml.DumperOptions;
|
||||
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
|
||||
import org.yaml.snakeyaml.LoaderOptions;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||
import org.yaml.snakeyaml.parser.ParserException;
|
||||
@ -89,7 +90,7 @@ public class YamlRegionFile implements RegionDatabase {
|
||||
options.setIndent(4);
|
||||
options.setDefaultFlowStyle(FlowStyle.AUTO);
|
||||
|
||||
ERROR_DUMP_YAML = new Yaml(new SafeConstructor(), new Representer(), options);
|
||||
ERROR_DUMP_YAML = new Yaml(new SafeConstructor(new LoaderOptions()), new Representer(new DumperOptions()), options);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -322,7 +323,7 @@ private void setDomainData(Map<String, Object> domainData, String key, Set<?> do
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a YAML processer instance.
|
||||
* Create a YAML processor instance.
|
||||
*
|
||||
* @param file the file
|
||||
* @return a processor instance
|
||||
@ -336,7 +337,7 @@ private YAMLProcessor createYamlProcessor(File file) {
|
||||
* Dump the given object as YAML for debugging purposes.
|
||||
*
|
||||
* @param object the object
|
||||
* @return the YAML string or an error string if dumping fals
|
||||
* @return the YAML string or an error string if dumping fails
|
||||
*/
|
||||
private static String toYamlOutput(Object object) {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user