mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-25 19:45:21 +01:00
1.15.2 Spigot/Paper NoSuchMethodError YamlCompat fix (#3242)
This commit is contained in:
parent
27ee6f519e
commit
18b41c82c4
@ -46,7 +46,12 @@ public abstract class Config implements ConfigurationProvider {
|
||||
options.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
|
||||
options.setPrettyFlow(false);
|
||||
options.setIndent(2);
|
||||
return new Yaml(YAMP_COMPAT.createSafeConstructor(), YAMP_COMPAT.createRepresenter(options), options);
|
||||
try {
|
||||
return new Yaml(YAMP_COMPAT.createSafeConstructor(), YAMP_COMPAT.createRepresenter(options), options);
|
||||
} catch (NoSuchMethodError e) {
|
||||
YamlCompat compat = new Yaml1Compat();
|
||||
return new Yaml(compat.createSafeConstructor(), compat.createRepresenter(options), options);
|
||||
}
|
||||
});
|
||||
|
||||
private final CommentStore commentStore = new CommentStore('.', 2);
|
||||
|
Loading…
Reference in New Issue
Block a user