package net.minecraft.network.protocol.game;

import net.minecraft.network.PacketListener;
import java.io.IOException;
import net.minecraft.network.FriendlyByteBuf;
import net.minecraft.network.chat.Component;
import net.minecraft.network.protocol.Packet;

public class ClientboundTabListPacket implements Packet<ClientGamePacketListener> {
    private Component header;
    private Component footer;
    
    @Override
    public void read(final FriendlyByteBuf kv) throws IOException {
        this.header = kv.readComponent();
        this.footer = kv.readComponent();
    }
    
    @Override
    public void write(final FriendlyByteBuf kv) throws IOException {
        kv.writeComponent(this.header);
        kv.writeComponent(this.footer);
    }
    
    @Override
    public void handle(final ClientGamePacketListener lw) {
        lw.handleTabListCustomisation(this);
    }
    
    public Component getHeader() {
        return this.header;
    }
    
    public Component getFooter() {
        return this.footer;
    }
}
