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 mg) throws IOException {
        this.header = mg.readComponent();
        this.footer = mg.readComponent();
    }
    
    @Override
    public void write(final FriendlyByteBuf mg) throws IOException {
        mg.writeComponent(this.header);
        mg.writeComponent(this.footer);
    }
    
    @Override
    public void handle(final ClientGamePacketListener nl) {
        nl.handleTabListCustomisation(this);
    }
    
    public Component getHeader() {
        return this.header;
    }
    
    public Component getFooter() {
        return this.footer;
    }
}
