// Generated by delombok at Tue Dec 16 19:35:15 UTC 2025
package net.md_5.bungee.protocol.packet;

import io.netty.buffer.ByteBuf;
import net.md_5.bungee.api.chat.BaseComponent;
import net.md_5.bungee.protocol.AbstractPacketHandler;
import net.md_5.bungee.protocol.DefinedPacket;
import net.md_5.bungee.protocol.ProtocolConstants;

public class PlayerListHeaderFooter extends DefinedPacket {
    private BaseComponent header;
    private BaseComponent footer;

    @Override
    public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        header = readBaseComponent(buf, protocolVersion);
        footer = readBaseComponent(buf, protocolVersion);
    }

    @Override
    public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        writeBaseComponent(header, buf, protocolVersion);
        writeBaseComponent(footer, buf, protocolVersion);
    }

    @Override
    public void handle(AbstractPacketHandler handler) throws Exception {
        handler.handle(this);
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BaseComponent getHeader() {
        return this.header;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public BaseComponent getFooter() {
        return this.footer;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setHeader(final BaseComponent header) {
        this.header = header;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setFooter(final BaseComponent footer) {
        this.footer = footer;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "PlayerListHeaderFooter(header=" + this.getHeader() + ", footer=" + this.getFooter() + ")";
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PlayerListHeaderFooter() {
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PlayerListHeaderFooter(final BaseComponent header, final BaseComponent footer) {
        this.header = header;
        this.footer = footer;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean equals(final java.lang.Object o) {
        if (o == this) return true;
        if (!(o instanceof PlayerListHeaderFooter)) return false;
        final PlayerListHeaderFooter other = (PlayerListHeaderFooter) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        final java.lang.Object this$header = this.getHeader();
        final java.lang.Object other$header = other.getHeader();
        if (this$header == null ? other$header != null : !this$header.equals(other$header)) return false;
        final java.lang.Object this$footer = this.getFooter();
        final java.lang.Object other$footer = other.getFooter();
        if (this$footer == null ? other$footer != null : !this$footer.equals(other$footer)) return false;
        return true;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    protected boolean canEqual(final java.lang.Object other) {
        return other instanceof PlayerListHeaderFooter;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final java.lang.Object $header = this.getHeader();
        result = result * PRIME + ($header == null ? 43 : $header.hashCode());
        final java.lang.Object $footer = this.getFooter();
        result = result * PRIME + ($footer == null ? 43 : $footer.hashCode());
        return result;
    }
}
