yaml ctors
This commit is contained in:
parent
4a26e306b6
commit
c0cbe27efc
|
@ -41,6 +41,7 @@ import com.sk89q.worldguard.protection.regions.ProtectedPolygonalRegion;
|
||||||
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
|
||||||
import org.yaml.snakeyaml.DumperOptions;
|
import org.yaml.snakeyaml.DumperOptions;
|
||||||
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
|
import org.yaml.snakeyaml.DumperOptions.FlowStyle;
|
||||||
|
import org.yaml.snakeyaml.LoaderOptions;
|
||||||
import org.yaml.snakeyaml.Yaml;
|
import org.yaml.snakeyaml.Yaml;
|
||||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||||
import org.yaml.snakeyaml.parser.ParserException;
|
import org.yaml.snakeyaml.parser.ParserException;
|
||||||
|
@ -89,7 +90,7 @@ public class YamlRegionFile implements RegionDatabase {
|
||||||
options.setIndent(4);
|
options.setIndent(4);
|
||||||
options.setDefaultFlowStyle(FlowStyle.AUTO);
|
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 @@ public class YamlRegionFile implements RegionDatabase {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a YAML processer instance.
|
* Create a YAML processor instance.
|
||||||
*
|
*
|
||||||
* @param file the file
|
* @param file the file
|
||||||
* @return a processor instance
|
* @return a processor instance
|
||||||
|
@ -336,7 +337,7 @@ public class YamlRegionFile implements RegionDatabase {
|
||||||
* Dump the given object as YAML for debugging purposes.
|
* Dump the given object as YAML for debugging purposes.
|
||||||
*
|
*
|
||||||
* @param object the object
|
* @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) {
|
private static String toYamlOutput(Object object) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue