// 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.ProxiedPlayer;
import net.md_5.bungee.api.plugin.Event;

/**
 * Called when a player has left the proxy, it is not safe to call any methods
 * that perform an action on the passed player instance.
 */
public class PlayerDisconnectEvent extends Event {
    /**
     * Player disconnecting.
     */
    private final ProxiedPlayer player;

    /**
     * Creates a new {@code PlayerDisconnectEvent} instance.
     *
     * @param player Player disconnecting.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PlayerDisconnectEvent(final ProxiedPlayer player) {
        this.player = player;
    }

    /**
     * Player disconnecting.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public ProxiedPlayer getPlayer() {
        return this.player;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "PlayerDisconnectEvent(player=" + this.getPlayer() + ")";
    }

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

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

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