diff --git a/src/de/steamwar/sql/SteamwarUser.java b/src/de/steamwar/sql/SteamwarUser.java index 1c4c173..edbcb26 100644 --- a/src/de/steamwar/sql/SteamwarUser.java +++ b/src/de/steamwar/sql/SteamwarUser.java @@ -36,7 +36,6 @@ public class SteamwarUser { String l = rs.getString(identifier); return l != null ? Locale.forLanguageTag(l) : null; }, (st, index, value) -> st.setString(index, value.toLanguageTag())); - SqlTypeMapper.nameEnumMapper(UserGroup.class); new SqlTypeMapper<>(SteamwarUser.class, null, (rs, identifier) -> { throw new SecurityException("SteamwarUser cannot be used as type (recursive select)"); }, (st, index, value) -> st.setInt(index, value.id)); } @@ -149,10 +148,6 @@ public class SteamwarUser { @Getter @Field private String userName; - @Deprecated - @Getter - @Field(def = "'Member'") - private final UserGroup userGroup; @Getter @Field(def = "0") private int team; @@ -171,11 +166,10 @@ public class SteamwarUser { private Set permissions = null; private UserPerm.Prefix prefix = null; - public SteamwarUser(int id, UUID uuid, String userName, UserGroup userGroup, int team, boolean leader, Locale locale, boolean manualLocale, Long discordId) { + public SteamwarUser(int id, UUID uuid, String userName, int team, boolean leader, Locale locale, boolean manualLocale, Long discordId) { this.id = id; this.uuid = uuid; this.userName = userName; - this.userGroup = userGroup; this.team = team; this.leader = leader; this.locale = locale; diff --git a/src/de/steamwar/sql/UserGroup.java b/src/de/steamwar/sql/UserGroup.java deleted file mode 100644 index 6a2b1ad..0000000 --- a/src/de/steamwar/sql/UserGroup.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is a part of the SteamWar software. - * - * Copyright (C) 2023 SteamWar.de-Serverteam - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ - -package de.steamwar.sql; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -@Deprecated -@AllArgsConstructor -public enum UserGroup { - Admin("§4", "§e", "Admin", true, true, true, true), - Developer("§3", "§f", "Dev", true, true, true, true), - Moderator("§c", "§f", "Mod", true, true, true, true), - Supporter("§9", "§f", "Sup", false, true, true, true), - Builder("§2", "§f", "Arch", false, true, false, true), - YouTuber("§5", "§f", "YT", false, false, false, true), - Member("§7", "§7", "", false, false, false, false); - - @Getter - private final String colorCode; - @Getter - private final String chatColorCode; - @Getter - private final String chatPrefix; - @Getter - private final boolean adminGroup; - @Getter - private final boolean teamGroup; - @Getter - private final boolean checkSchematics; - @Getter - private final boolean privilegedMods; - - public static UserGroup getUsergroup(String name) { - for(UserGroup group : values()) { - if(group.name().equalsIgnoreCase(name)) - return group; - } - - throw new IllegalArgumentException(name); - } -} \ No newline at end of file