From c4891ccbb574adb6e6dd9bf64bf1f0b0e02c963a Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Sat, 6 Apr 2024 14:44:24 -0400 Subject: [PATCH] Player model --- .../me/braydon/mc/model/ModerationAction.java | 20 +++++++++++++ src/main/java/me/braydon/mc/model/Player.java | 28 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 src/main/java/me/braydon/mc/model/ModerationAction.java create mode 100644 src/main/java/me/braydon/mc/model/Player.java diff --git a/src/main/java/me/braydon/mc/model/ModerationAction.java b/src/main/java/me/braydon/mc/model/ModerationAction.java new file mode 100644 index 0000000..77907a5 --- /dev/null +++ b/src/main/java/me/braydon/mc/model/ModerationAction.java @@ -0,0 +1,20 @@ +package me.braydon.mc.model; + +/** + * Moderation actions that can + * be taken on a {@link Player}. + * + * @author Braydon + */ +public enum ModerationAction { + /** + * The player is required to change their + * username before accessing Multiplayer. + */ + FORCED_NAME_CHANGE, + + /** + * The player is using a banned skin. + */ + USING_BANNED_SKIN +} \ No newline at end of file diff --git a/src/main/java/me/braydon/mc/model/Player.java b/src/main/java/me/braydon/mc/model/Player.java new file mode 100644 index 0000000..e72f904 --- /dev/null +++ b/src/main/java/me/braydon/mc/model/Player.java @@ -0,0 +1,28 @@ +package me.braydon.mc.model; + +import lombok.*; + +import java.util.UUID; + +/** + * A model representing a player. + * + * @author Braydon + */ +@NoArgsConstructor @AllArgsConstructor @Setter @Getter @EqualsAndHashCode(onlyExplicitlyIncluded = true) @ToString +public final class Player { + /** + * The unique id of this player. + */ + @EqualsAndHashCode.Include @NonNull private UUID uniqueId; + + /** + * The username of this player. + */ + @NonNull private String username; + + /** + * The profile actions this player has. + */ + @NonNull private ModerationAction[] profileActions; +} \ No newline at end of file