// 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;

public class PingPacket extends DefinedPacket {
    private long time;

    @Override
    public void read(ByteBuf buf) {
        time = buf.readLong();
    }

    @Override
    public void write(ByteBuf buf) {
        buf.writeLong(time);
    }

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public long getTime() {
        return this.time;
    }

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setTime(final long time) {
        this.time = time;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "PingPacket(time=" + this.getTime() + ")";
    }

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

    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PingPacket(final long time) {
        this.time = time;
    }

    @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 PingPacket)) return false;
        final PingPacket other = (PingPacket) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (this.getTime() != other.getTime()) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final long $time = this.getTime();
        result = result * PRIME + (int) ($time >>> 32 ^ $time);
        return result;
    }
}
