From d58c461a65655513bb0beba30dd152f45a61bc37 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Fri, 28 Jun 2024 09:10:37 +0200 Subject: [PATCH] Fix DiscordConfig Signed-off-by: Lixfel --- .../velocitycore/discord/DiscordConfig.java | 22 ++----------------- 1 file changed, 2 insertions(+), 20 deletions(-) diff --git a/src/de/steamwar/velocitycore/discord/DiscordConfig.java b/src/de/steamwar/velocitycore/discord/DiscordConfig.java index be73aa5..967d74a 100644 --- a/src/de/steamwar/velocitycore/discord/DiscordConfig.java +++ b/src/de/steamwar/velocitycore/discord/DiscordConfig.java @@ -21,9 +21,8 @@ package de.steamwar.velocitycore.discord; import de.steamwar.velocitycore.Config; import de.steamwar.velocitycore.VelocityCore; -import lombok.AllArgsConstructor; -import lombok.Data; import lombok.Getter; +import lombok.NoArgsConstructor; import net.dv8tion.jda.api.entities.Emoji; import net.dv8tion.jda.api.interactions.components.Button; import net.dv8tion.jda.api.interactions.components.ButtonStyle; @@ -41,20 +40,6 @@ public class DiscordConfig { return null; return Config.load(DiscordConfig.class, file, description -> description.addPropertyParameters("roles", String.class, DiscordRole.class)); - /*TypeDescription typeDescription = new TypeDescription(DiscordConfig.class); - typeDescription.addPropertyParameters("roles", String.class, DiscordRole.class); - - Constructor constructor = new Constructor(DiscordConfig.class, new LoaderOptions()); - constructor.addTypeDescription(typeDescription); - - Yaml yaml = new Yaml(constructor); - yaml.setBeanAccess(BeanAccess.FIELD); - - try{ - return yaml.load(new FileInputStream(file)); - }catch(IOException e){ - throw new SecurityException("Could not load discord bot configuration", e); - }*/ } public String channel(String type) { @@ -71,10 +56,7 @@ public class DiscordConfig { private String ticketcategory; - //public static final Map RANKS = new HashMap<>(); - - @Data - @AllArgsConstructor + @NoArgsConstructor public static class DiscordRole { private String emoji;