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

/**
 * An event which occurs in the communication between two nodes.
 */
public abstract class TargetedEvent extends Event {
    /**
     * Creator of the action.
     */
    private final Connection sender;
    /**
     * Receiver of the action.
     */
    private final Connection receiver;

    /**
     * Creator of the action.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Connection getSender() {
        return this.sender;
    }

    /**
     * Receiver of the action.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public Connection getReceiver() {
        return this.receiver;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "TargetedEvent(sender=" + this.getSender() + ", receiver=" + this.getReceiver() + ")";
    }

    /**
     * Creates a new {@code TargetedEvent} instance.
     *
     * @param sender Creator of the action.
     * @param receiver Receiver of the action.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public TargetedEvent(final Connection sender, final Connection receiver) {
        this.sender = sender;
        this.receiver = receiver;
    }

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

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

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