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; } }