From 9593bd988e7ad508992fbb7cf7a1476a083011ad Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Sat, 6 Apr 2024 23:05:07 -0400 Subject: [PATCH] Updated models --- src/main/java/me/braydon/mc/model/Player.java | 14 ++++++-------- .../braydon/mc/model/token/MojangProfileToken.java | 10 +++++----- .../mc/model/token/MojangUsernameToUUIDToken.java | 8 ++++---- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/src/main/java/me/braydon/mc/model/Player.java b/src/main/java/me/braydon/mc/model/Player.java index 4113a74..b61cdd5 100644 --- a/src/main/java/me/braydon/mc/model/Player.java +++ b/src/main/java/me/braydon/mc/model/Player.java @@ -10,34 +10,32 @@ import java.util.UUID; * * @author Braydon */ -@NoArgsConstructor -@AllArgsConstructor -@Setter @Getter +@AllArgsConstructor @Getter @EqualsAndHashCode(onlyExplicitlyIncluded = true) @ToString public class Player { /** * The unique id of this player. */ - @Id @EqualsAndHashCode.Include @NonNull private UUID uniqueId; + @Id @EqualsAndHashCode.Include @NonNull private final UUID uniqueId; /** * The username of this player. */ - @NonNull private String username; + @NonNull private final String username; /** * The skin of this player. */ - @NonNull private Skin skin; + @NonNull private final Skin skin; /** * The cape of this player, null if none. */ - private Cape cape; + private final Cape cape; /** * The profile actions this player has, null if none. */ - private ProfileAction[] profileActions; + private final ProfileAction[] profileActions; } \ No newline at end of file diff --git a/src/main/java/me/braydon/mc/model/token/MojangProfileToken.java b/src/main/java/me/braydon/mc/model/token/MojangProfileToken.java index bbb43a4..096abd3 100644 --- a/src/main/java/me/braydon/mc/model/token/MojangProfileToken.java +++ b/src/main/java/me/braydon/mc/model/token/MojangProfileToken.java @@ -16,27 +16,27 @@ import java.util.Base64; * @author Braydon * @see Mojang API */ -@NoArgsConstructor @Setter @Getter @EqualsAndHashCode(onlyExplicitlyIncluded = true) @ToString +@AllArgsConstructor @Getter @EqualsAndHashCode(onlyExplicitlyIncluded = true) @ToString public final class MojangProfileToken { /** * The id of the profile. */ - @EqualsAndHashCode.Include @NonNull private String id; + @EqualsAndHashCode.Include @NonNull private final String id; /** * The name of the profile. */ - @NonNull private String name; + @NonNull private final String name; /** * The properties of the profile. */ - @NonNull private ProfileProperty[] properties; + @NonNull private final ProfileProperty[] properties; /** * The actions this profile has. */ - @NonNull private ProfileAction[] profileActions; + @NonNull private final ProfileAction[] profileActions; public Tuple getSkinAndCape() { ProfileProperty textures = getPropertyByName("textures"); // Get the profile textures diff --git a/src/main/java/me/braydon/mc/model/token/MojangUsernameToUUIDToken.java b/src/main/java/me/braydon/mc/model/token/MojangUsernameToUUIDToken.java index fdf7cd1..59d41f4 100644 --- a/src/main/java/me/braydon/mc/model/token/MojangUsernameToUUIDToken.java +++ b/src/main/java/me/braydon/mc/model/token/MojangUsernameToUUIDToken.java @@ -1,8 +1,8 @@ package me.braydon.mc.model.token; +import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; +import lombok.NonNull; import lombok.ToString; /** @@ -11,10 +11,10 @@ import lombok.ToString; * @author Braydon * @see Mojang API */ -@NoArgsConstructor @Setter @Getter @ToString +@AllArgsConstructor @Getter @ToString public final class MojangUsernameToUUIDToken { /** * The id of the username. */ - private String id; + @NonNull private final String id; } \ No newline at end of file