From ae597545642b8122505fa6c564d4bc753ae4160e Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Wed, 10 May 2023 12:54:54 +0700 Subject: [PATCH] upgrade to snakeyaml 2.0 took me some time to figure out, i just need to add `new LoaderOptions()` and thats it --- pom.xml | 2 +- src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d47702bb..264bc538 100644 --- a/pom.xml +++ b/pom.xml @@ -94,7 +94,7 @@ org.yaml snakeyaml - 1.29 + 2.0 diff --git a/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java b/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java index 8839f3bd..b4aa67f2 100644 --- a/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java +++ b/src/main/java/land/chipmunk/chayapak/chomens_bot/Main.java @@ -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;