3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-09-08 13:52:50 +02:00

1.15.2 Spigot/Paper NoSuchMethodError YamlCompat fix (#3242)

Dieser Commit ist enthalten in:
lixfel 2023-03-14 21:48:40 +01:00 committet von GitHub
Ursprung 27ee6f519e
Commit 18b41c82c4
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -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);