// 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.protocol.AbstractPacketHandler;
import net.md_5.bungee.protocol.DefinedPacket;
import net.md_5.bungee.protocol.ProtocolConstants;

public class ScoreboardScoreReset extends DefinedPacket {
    private String itemName;
    private String scoreName;

    @Override
    public void read(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        itemName = readString(buf);
        scoreName = readNullable(DefinedPacket::readString, buf);
    }

    @Override
    public void write(ByteBuf buf, ProtocolConstants.Direction direction, int protocolVersion) {
        writeString(itemName, buf);
        writeNullable(scoreName, DefinedPacket::writeString, buf);
    }

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getItemName() {
        return this.itemName;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getScoreName() {
        return this.scoreName;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setItemName(final String itemName) {
        this.itemName = itemName;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setScoreName(final String scoreName) {
        this.scoreName = scoreName;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "ScoreboardScoreReset(itemName=" + this.getItemName() + ", scoreName=" + this.getScoreName() + ")";
    }

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public ScoreboardScoreReset(final String itemName, final String scoreName) {
        this.itemName = itemName;
        this.scoreName = scoreName;
    }

    @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 ScoreboardScoreReset)) return false;
        final ScoreboardScoreReset other = (ScoreboardScoreReset) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        final java.lang.Object this$itemName = this.getItemName();
        final java.lang.Object other$itemName = other.getItemName();
        if (this$itemName == null ? other$itemName != null : !this$itemName.equals(other$itemName)) return false;
        final java.lang.Object this$scoreName = this.getScoreName();
        final java.lang.Object other$scoreName = other.getScoreName();
        if (this$scoreName == null ? other$scoreName != null : !this$scoreName.equals(other$scoreName)) return false;
        return true;
    }

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

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