SteamWar/BungeeCore
Archiviert
13
2

Fix DiscordConfig
Einige Prüfungen sind fehlgeschlagen
SteamWarCI Build failed

Signed-off-by: Lixfel <git-5w3l@lixfel.de>
Dieser Commit ist enthalten in:
Lixfel 2024-06-28 09:10:37 +02:00
Ursprung 213bc3d319
Commit d58c461a65

Datei anzeigen

@ -21,9 +21,8 @@ package de.steamwar.velocitycore.discord;
import de.steamwar.velocitycore.Config; import de.steamwar.velocitycore.Config;
import de.steamwar.velocitycore.VelocityCore; import de.steamwar.velocitycore.VelocityCore;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor;
import net.dv8tion.jda.api.entities.Emoji; import net.dv8tion.jda.api.entities.Emoji;
import net.dv8tion.jda.api.interactions.components.Button; import net.dv8tion.jda.api.interactions.components.Button;
import net.dv8tion.jda.api.interactions.components.ButtonStyle; import net.dv8tion.jda.api.interactions.components.ButtonStyle;
@ -41,20 +40,6 @@ public class DiscordConfig {
return null; return null;
return Config.load(DiscordConfig.class, file, description -> description.addPropertyParameters("roles", String.class, DiscordRole.class)); 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) { public String channel(String type) {
@ -71,10 +56,7 @@ public class DiscordConfig {
private String ticketcategory; private String ticketcategory;
//public static final Map<UserPerm, String> RANKS = new HashMap<>(); @NoArgsConstructor
@Data
@AllArgsConstructor
public static class DiscordRole { public static class DiscordRole {
private String emoji; private String emoji;