(very partially) lombokify

i should have done it before but whatever
This commit is contained in:
Chipmunk 2022-12-16 19:24:02 -05:00
parent b0fb8c8c5f
commit 549eef6647
3 changed files with 13 additions and 38 deletions

2
lombok.config Normal file
View file

@ -0,0 +1,2 @@
config.stopBubbling = true
lombok.accessors.fluent = true

View file

@ -31,6 +31,13 @@
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
<version>2.9.0</version> <version>2.9.0</version>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View file

@ -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.PlayerListEntry;
import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode; import com.github.steveice10.mc.protocol.data.game.entity.player.GameMode;
import net.kyori.adventure.text.Component; import net.kyori.adventure.text.Component;
import lombok.Data;
import lombok.AllArgsConstructor;
import java.security.PublicKey; import java.security.PublicKey;
@Data
@AllArgsConstructor
public class MutablePlayerListEntry { public class MutablePlayerListEntry {
private GameProfile profile; private GameProfile profile;
private GameMode gamemode; private GameMode gamemode;
@ -16,45 +20,7 @@ public class MutablePlayerListEntry {
private PublicKey publicKey; private PublicKey publicKey;
private byte[] keySignature; 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) { public MutablePlayerListEntry (PlayerListEntry entry) {
this(entry.getProfile(), entry.getGameMode(), entry.getPing(), entry.getDisplayName(), entry.getExpiresAt(), entry.getPublicKey(), entry.getKeySignature()); 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; }
} }