// Generated by delombok at Tue Dec 16 19:35:27 UTC 2025
package net.md_5.bungee.api.event;

import net.md_5.bungee.api.connection.PendingConnection;
import net.md_5.bungee.api.plugin.Event;
import net.md_5.bungee.protocol.packet.Handshake;

/**
 * Event called to represent a player first making their presence and username
 * known.
 */
public class PlayerHandshakeEvent extends Event {
    /**
     * Connection attempting to login.
     */
    private final PendingConnection connection;
    /**
     * The handshake.
     */
    private final Handshake handshake;

    public PlayerHandshakeEvent(PendingConnection connection, Handshake handshake) {
        this.connection = connection;
        this.handshake = handshake;
    }

    /**
     * Connection attempting to login.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PendingConnection getConnection() {
        return this.connection;
    }

    /**
     * The handshake.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Handshake getHandshake() {
        return this.handshake;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "PlayerHandshakeEvent(connection=" + this.getConnection() + ", handshake=" + this.getHandshake() + ")";
    }

    @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 PlayerHandshakeEvent)) return false;
        final PlayerHandshakeEvent other = (PlayerHandshakeEvent) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        final java.lang.Object this$connection = this.getConnection();
        final java.lang.Object other$connection = other.getConnection();
        if (this$connection == null ? other$connection != null : !this$connection.equals(other$connection)) return false;
        final java.lang.Object this$handshake = this.getHandshake();
        final java.lang.Object other$handshake = other.getHandshake();
        if (this$handshake == null ? other$handshake != null : !this$handshake.equals(other$handshake)) return false;
        return true;
    }

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

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