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

import java.util.List;
import net.md_5.bungee.api.connection.Connection;
import net.md_5.bungee.api.plugin.Cancellable;

/**
 * Event called when a player uses tab completion.
 */
public class TabCompleteEvent extends TargetedEvent implements Cancellable {
    /**
     * Cancelled state.
     */
    private boolean cancelled;
    /**
     * The message the player has already entered.
     */
    private final String cursor;
    /**
     * The suggestions that will be sent to the client. This list is mutable. If
     * this list is empty, the request will be forwarded to the server.
     */
    private final List<String> suggestions;

    public TabCompleteEvent(Connection sender, Connection receiver, String cursor, List<String> suggestions) {
        super(sender, receiver);
        this.cursor = cursor;
        this.suggestions = suggestions;
    }

    /**
     * Cancelled state.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public boolean isCancelled() {
        return this.cancelled;
    }

    /**
     * The message the player has already entered.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getCursor() {
        return this.cursor;
    }

    /**
     * The suggestions that will be sent to the client. This list is mutable. If
     * this list is empty, the request will be forwarded to the server.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public List<String> getSuggestions() {
        return this.suggestions;
    }

    /**
     * Cancelled state.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setCancelled(final boolean cancelled) {
        this.cancelled = cancelled;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "TabCompleteEvent(super=" + super.toString() + ", cancelled=" + this.isCancelled() + ", cursor=" + this.getCursor() + ", suggestions=" + this.getSuggestions() + ")";
    }

    @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 TabCompleteEvent)) return false;
        final TabCompleteEvent other = (TabCompleteEvent) o;
        if (!other.canEqual((java.lang.Object) this)) return false;
        if (!super.equals(o)) return false;
        if (this.isCancelled() != other.isCancelled()) return false;
        final java.lang.Object this$cursor = this.getCursor();
        final java.lang.Object other$cursor = other.getCursor();
        if (this$cursor == null ? other$cursor != null : !this$cursor.equals(other$cursor)) return false;
        final java.lang.Object this$suggestions = this.getSuggestions();
        final java.lang.Object other$suggestions = other.getSuggestions();
        if (this$suggestions == null ? other$suggestions != null : !this$suggestions.equals(other$suggestions)) return false;
        return true;
    }

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

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public int hashCode() {
        final int PRIME = 59;
        int result = super.hashCode();
        result = result * PRIME + (this.isCancelled() ? 79 : 97);
        final java.lang.Object $cursor = this.getCursor();
        result = result * PRIME + ($cursor == null ? 43 : $cursor.hashCode());
        final java.lang.Object $suggestions = this.getSuggestions();
        result = result * PRIME + ($suggestions == null ? 43 : $suggestions.hashCode());
        return result;
    }
}
