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

/**
 * Called when the permission of a CommandSender is checked.
 */
public class PermissionCheckEvent extends Event {
    /**
     * The command sender being checked for a permission.
     */
    private final CommandSender sender;
    /**
     * The permission to check.
     */
    private final String permission;
    /**
     * The outcome of this permission check.
     */
    private boolean hasPermission;

    public boolean hasPermission() {
        return hasPermission;
    }

    /**
     * The command sender being checked for a permission.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public CommandSender getSender() {
        return this.sender;
    }

    /**
     * The permission to check.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public String getPermission() {
        return this.permission;
    }

    /**
     * The outcome of this permission check.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public void setHasPermission(final boolean hasPermission) {
        this.hasPermission = hasPermission;
    }

    /**
     * Creates a new {@code PermissionCheckEvent} instance.
     *
     * @param sender The command sender being checked for a permission.
     * @param permission The permission to check.
     * @param hasPermission The outcome of this permission check.
     */
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public PermissionCheckEvent(final CommandSender sender, final String permission, final boolean hasPermission) {
        this.sender = sender;
        this.permission = permission;
        this.hasPermission = hasPermission;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("all")
    @lombok.Generated
    public java.lang.String toString() {
        return "PermissionCheckEvent(sender=" + this.getSender() + ", permission=" + this.getPermission() + ", hasPermission=" + this.hasPermission + ")";
    }

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

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

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