From 84dfe5a1190fad76d58c17c60b51c00251b211e5 Mon Sep 17 00:00:00 2001 From: Liam Date: Thu, 27 Jun 2024 13:02:55 +0100 Subject: [PATCH] cleanup --- src/main/java/cc/fascinated/bat/common/Profile.java | 4 +--- src/main/java/cc/fascinated/bat/common/ProfileHolder.java | 3 +-- .../bat/features/autorole/profile/AutoRoleProfile.java | 3 +-- .../bat/features/birthday/profile/BirthdayProfile.java | 3 +-- .../profile/GuildNumberOneScoreFeedProfile.java | 4 +--- .../scoresaber/profile/GuildUserScoreFeedProfile.java | 3 +-- .../scoresaber/profile/UserScoreSaberProfile.java | 4 +--- src/main/java/cc/fascinated/bat/model/BatGuild.java | 6 +----- src/main/java/cc/fascinated/bat/model/BatUser.java | 6 +----- .../beatsaber/scoresaber/ScoreSaberAccountToken.java | 8 +++----- 10 files changed, 12 insertions(+), 32 deletions(-) diff --git a/src/main/java/cc/fascinated/bat/common/Profile.java b/src/main/java/cc/fascinated/bat/common/Profile.java index 37bcdc9..42e089b 100644 --- a/src/main/java/cc/fascinated/bat/common/Profile.java +++ b/src/main/java/cc/fascinated/bat/common/Profile.java @@ -4,14 +4,12 @@ import lombok.AllArgsConstructor; import lombok.Getter; import lombok.Setter; -import java.io.Serializable; - /** * @author Fascinated (fascinated7) */ @AllArgsConstructor @Getter @Setter -public abstract class Profile implements Serializable { +public abstract class Profile { /** * The key of the profile. */ diff --git a/src/main/java/cc/fascinated/bat/common/ProfileHolder.java b/src/main/java/cc/fascinated/bat/common/ProfileHolder.java index 5a9a191..6a38aef 100644 --- a/src/main/java/cc/fascinated/bat/common/ProfileHolder.java +++ b/src/main/java/cc/fascinated/bat/common/ProfileHolder.java @@ -2,7 +2,6 @@ package cc.fascinated.bat.common; import lombok.Getter; -import java.io.Serializable; import java.util.HashMap; import java.util.Map; @@ -10,7 +9,7 @@ import java.util.Map; * @author Fascinated (fascinated7) */ @Getter -public class ProfileHolder implements Serializable { +public class ProfileHolder { /** * The profiles for the holder */ diff --git a/src/main/java/cc/fascinated/bat/features/autorole/profile/AutoRoleProfile.java b/src/main/java/cc/fascinated/bat/features/autorole/profile/AutoRoleProfile.java index 57db1cf..508d767 100644 --- a/src/main/java/cc/fascinated/bat/features/autorole/profile/AutoRoleProfile.java +++ b/src/main/java/cc/fascinated/bat/features/autorole/profile/AutoRoleProfile.java @@ -6,7 +6,6 @@ import lombok.Getter; import lombok.Setter; import net.dv8tion.jda.api.entities.Role; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -14,7 +13,7 @@ import java.util.List; * @author Fascinated (fascinated7) */ @Setter @Getter -public class AutoRoleProfile extends Profile implements Serializable { +public class AutoRoleProfile extends Profile { private static final int DEFAULT_MAX_ROLES = 10; /** diff --git a/src/main/java/cc/fascinated/bat/features/birthday/profile/BirthdayProfile.java b/src/main/java/cc/fascinated/bat/features/birthday/profile/BirthdayProfile.java index 7044511..3e64aa6 100644 --- a/src/main/java/cc/fascinated/bat/features/birthday/profile/BirthdayProfile.java +++ b/src/main/java/cc/fascinated/bat/features/birthday/profile/BirthdayProfile.java @@ -9,7 +9,6 @@ import net.dv8tion.jda.api.entities.Member; import net.dv8tion.jda.api.entities.User; import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; -import java.io.Serializable; import java.util.*; /** @@ -17,7 +16,7 @@ import java.util.*; */ @Getter @Setter -public class BirthdayProfile extends Profile implements Serializable { +public class BirthdayProfile extends Profile { private static final String DEFAULT_MESSAGE = "Happy Birthday {user} :tada: :birthday: You are now {age} years old!"; /** diff --git a/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildNumberOneScoreFeedProfile.java b/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildNumberOneScoreFeedProfile.java index e3e3f32..873dfc3 100644 --- a/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildNumberOneScoreFeedProfile.java +++ b/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildNumberOneScoreFeedProfile.java @@ -6,13 +6,11 @@ import lombok.Getter; import lombok.Setter; import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; -import java.io.Serializable; - /** * @author Fascinated (fascinated7) */ @Getter @Setter -public class GuildNumberOneScoreFeedProfile extends Profile implements Serializable { +public class GuildNumberOneScoreFeedProfile extends Profile { /** * The channel ID of the score feed */ diff --git a/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildUserScoreFeedProfile.java b/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildUserScoreFeedProfile.java index 4887e4f..e68b2de 100644 --- a/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildUserScoreFeedProfile.java +++ b/src/main/java/cc/fascinated/bat/features/scoresaber/profile/GuildUserScoreFeedProfile.java @@ -6,7 +6,6 @@ import lombok.Getter; import lombok.Setter; import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -14,7 +13,7 @@ import java.util.List; * @author Fascinated (fascinated7) */ @Getter @Setter -public class GuildUserScoreFeedProfile extends Profile implements Serializable { +public class GuildUserScoreFeedProfile extends Profile { /** * The channel ID of the score feed */ diff --git a/src/main/java/cc/fascinated/bat/features/scoresaber/profile/UserScoreSaberProfile.java b/src/main/java/cc/fascinated/bat/features/scoresaber/profile/UserScoreSaberProfile.java index 57ca77f..1a4fa04 100644 --- a/src/main/java/cc/fascinated/bat/features/scoresaber/profile/UserScoreSaberProfile.java +++ b/src/main/java/cc/fascinated/bat/features/scoresaber/profile/UserScoreSaberProfile.java @@ -4,13 +4,11 @@ import cc.fascinated.bat.common.Profile; import lombok.Getter; import lombok.Setter; -import java.io.Serializable; - /** * @author Fascinated (fascinated7) */ @Setter @Getter -public class UserScoreSaberProfile extends Profile implements Serializable { +public class UserScoreSaberProfile extends Profile { /** * The Account ID of the ScoreSaber profile */ diff --git a/src/main/java/cc/fascinated/bat/model/BatGuild.java b/src/main/java/cc/fascinated/bat/model/BatGuild.java index 727cb44..c8035e4 100644 --- a/src/main/java/cc/fascinated/bat/model/BatGuild.java +++ b/src/main/java/cc/fascinated/bat/model/BatGuild.java @@ -10,8 +10,6 @@ import net.dv8tion.jda.api.entities.Guild; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; -import java.io.Serial; -import java.io.Serializable; import java.util.Date; /** @@ -20,9 +18,7 @@ import java.util.Date; @RequiredArgsConstructor @Getter @Setter @Document(collection = "guilds") -public class BatGuild extends ProfileHolder implements Serializable { - @Serial private static final long serialVersionUID = 1L; - +public class BatGuild extends ProfileHolder { /** * The ID of the guild */ diff --git a/src/main/java/cc/fascinated/bat/model/BatUser.java b/src/main/java/cc/fascinated/bat/model/BatUser.java index c7abc5d..72d0242 100644 --- a/src/main/java/cc/fascinated/bat/model/BatUser.java +++ b/src/main/java/cc/fascinated/bat/model/BatUser.java @@ -10,8 +10,6 @@ import net.dv8tion.jda.api.entities.User; import org.springframework.data.annotation.Id; import org.springframework.data.mongodb.core.mapping.Document; -import java.io.Serial; -import java.io.Serializable; import java.util.Date; /** @@ -20,9 +18,7 @@ import java.util.Date; @RequiredArgsConstructor @Getter @Setter @Document(collection = "users") -public class BatUser extends ProfileHolder implements Serializable { - @Serial private static final long serialVersionUID = 1L; - +public class BatUser extends ProfileHolder { /** * The ID of the user */ diff --git a/src/main/java/cc/fascinated/bat/model/token/beatsaber/scoresaber/ScoreSaberAccountToken.java b/src/main/java/cc/fascinated/bat/model/token/beatsaber/scoresaber/ScoreSaberAccountToken.java index a48af98..f470417 100644 --- a/src/main/java/cc/fascinated/bat/model/token/beatsaber/scoresaber/ScoreSaberAccountToken.java +++ b/src/main/java/cc/fascinated/bat/model/token/beatsaber/scoresaber/ScoreSaberAccountToken.java @@ -3,10 +3,8 @@ package cc.fascinated.bat.model.token.beatsaber.scoresaber; import lombok.AllArgsConstructor; import lombok.Getter; -import java.io.Serializable; - @Getter -public class ScoreSaberAccountToken implements Serializable { +public class ScoreSaberAccountToken { /** * The id for this ScoreSaber account. */ @@ -91,7 +89,7 @@ public class ScoreSaberAccountToken implements Serializable { * The badge for this account. */ @AllArgsConstructor @Getter - public static class Badge implements Serializable { + public static class Badge { /** * The image for this badge. */ @@ -107,7 +105,7 @@ public class ScoreSaberAccountToken implements Serializable { * The score stats for this account. */ @AllArgsConstructor @Getter - public static class ScoreStats implements Serializable { + public static class ScoreStats { /** * The total score for this account. */