upgrade to snakeyaml 2.0

took me some time to figure out, i just need to add `new LoaderOptions()` and thats it
This commit is contained in:
Chayapak 2023-05-10 12:54:54 +07:00
parent f4e30e04b8
commit ae59754564
2 changed files with 3 additions and 2 deletions

View file

@ -94,7 +94,7 @@
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.29</version>
<version>2.0</version>
</dependency>
<dependency>

View file

@ -4,6 +4,7 @@ import land.chipmunk.chayapak.chomens_bot.plugins.ConsolePlugin;
import net.dv8tion.jda.api.JDA;
import net.dv8tion.jda.api.JDABuilder;
import net.dv8tion.jda.api.entities.Activity;
import org.yaml.snakeyaml.LoaderOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.constructor.Constructor;
@ -21,7 +22,7 @@ public class Main {
public static void main(String[] args) throws IOException {
final File file = new File("config.yml");
final Constructor constructor = new Constructor(Configuration.class);
final Constructor constructor = new Constructor(Configuration.class, new LoaderOptions());
final Yaml yaml = new Yaml(constructor);
Configuration _config;