SPIGOT-7161: SnakeYaml 1.32 changed the default file size limit

This commit is contained in:
md_5 2022-10-09 11:40:29 +11:00
parent 0994345029
commit b24bb75af9
No known key found for this signature in database
GPG key ID: E8E901AC7C617C11

View file

@ -64,6 +64,7 @@ public class YamlConfiguration extends FileConfiguration {
yamlDumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); yamlDumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
yamlLoaderOptions = new LoaderOptions(); yamlLoaderOptions = new LoaderOptions();
yamlLoaderOptions.setMaxAliasesForCollections(Integer.MAX_VALUE); // SPIGOT-5881: Not ideal, but was default pre SnakeYAML 1.26 yamlLoaderOptions.setMaxAliasesForCollections(Integer.MAX_VALUE); // SPIGOT-5881: Not ideal, but was default pre SnakeYAML 1.26
yamlLoaderOptions.setCodePointLimit(Integer.MAX_VALUE); // SPIGOT-7161: Not ideal, but was default pre SnakeYAML 1.32
yaml = new BukkitYaml(constructor, representer, yamlDumperOptions, yamlLoaderOptions); yaml = new BukkitYaml(constructor, representer, yamlDumperOptions, yamlLoaderOptions);
} }