package land.chipmunk.chipmunkmod.data;

import com.mojang.authlib.GameProfile;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
import net.minecraft.world.level.GameType;

public class MutablePlayerListEntry {
    public GameProfile profile;
    public GameType gamemode;
    public int latency;
    public Component displayName;

    public MutablePlayerListEntry (final GameProfile profile, final GameType gamemode, final int latency, final Component displayName) {
        this.profile = profile;
        this.gamemode = gamemode;
        this.latency = latency;
        this.displayName = displayName;
    }

    public MutablePlayerListEntry (final ClientboundPlayerInfoUpdatePacket.Entry entry) {
        this(entry.profile(), entry.gameMode(), entry.latency(), entry.displayName());
    }
}
