From 549eef6647da2329ca10cd0a48a8e32bbd0650d0 Mon Sep 17 00:00:00 2001 From: Chip <65827213+ChipmunkMC@users.noreply.github.com> Date: Fri, 16 Dec 2022 19:24:02 -0500 Subject: [PATCH] (very partially) lombokify i should have done it before but whatever --- lombok.config | 2 + pom.xml | 7 ++++ .../data/MutablePlayerListEntry.java | 42 ++----------------- 3 files changed, 13 insertions(+), 38 deletions(-) create mode 100644 lombok.config diff --git a/lombok.config b/lombok.config new file mode 100644 index 0000000..347c825 --- /dev/null +++ b/lombok.config @@ -0,0 +1,2 @@ +config.stopBubbling = true +lombok.accessors.fluent = true \ No newline at end of file diff --git a/pom.xml b/pom.xml index fd62198..32e9583 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,13 @@ gson 2.9.0 + + + org.projectlombok + lombok + 1.18.24 + provided + diff --git a/src/main/java/land/chipmunk/chipmunkbot/data/MutablePlayerListEntry.java b/src/main/java/land/chipmunk/chipmunkbot/data/MutablePlayerListEntry.java index 4a577da..daecaf3 100644 --- a/src/main/java/land/chipmunk/chipmunkbot/data/MutablePlayerListEntry.java +++ b/src/main/java/land/chipmunk/chipmunkbot/data/MutablePlayerListEntry.java @@ -4,9 +4,13 @@ import com.github.steveice10.mc.auth.data.GameProfile; import com.github.steveice10.mc.protocol.data.game.PlayerListEntry; import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode; import net.kyori.adventure.text.Component; +import lombok.Data; +import lombok.AllArgsConstructor; import java.security.PublicKey; +@Data +@AllArgsConstructor public class MutablePlayerListEntry { private GameProfile profile; private GameMode gamemode; @@ -16,45 +20,7 @@ public class MutablePlayerListEntry { private PublicKey publicKey; private byte[] keySignature; - public MutablePlayerListEntry (GameProfile profile, GameMode gamemode, int latency, Component displayName, long expiresAt, PublicKey publicKey, byte[] keySignature) { - this.profile = profile; - this.gamemode = gamemode; - this.latency = latency; - this.displayName = displayName; - this.expiresAt = expiresAt; - this.publicKey = publicKey; - this.keySignature = keySignature; - } - public MutablePlayerListEntry (PlayerListEntry entry) { this(entry.getProfile(), entry.getGameMode(), entry.getPing(), entry.getDisplayName(), entry.getExpiresAt(), entry.getPublicKey(), entry.getKeySignature()); } - - public GameProfile profile () { return this.profile; } - - public void profile (GameProfile profile) { this.profile = profile; } - - public GameMode gamemode () { return this.gamemode; } - - public void gamemode (GameMode gamemode) { this.gamemode = gamemode; } - - public int latency () { return this.latency; } - - public void latency (int latency) { this.latency = latency; } - - public Component displayName () { return this.displayName; } - - public void displayName (Component displayName) { this.displayName = displayName; } - - public long expiresAt () { return this.expiresAt; } - - public void expiresAt (long expiresAt) { this.expiresAt = expiresAt; } - - public PublicKey publicKey () { return this.publicKey; } - - public void publicKey (PublicKey publicKey) { this.publicKey = publicKey; } - - public byte[] keySignature () { return this.keySignature; } - - public void keySignature (byte[] keySignature) { this.keySignature = keySignature; } }