Class KitAvailableCheckEvent

java.lang.Object
org.bukkit.event.Event
net.godlycow.org.essc.api.kit.event.KitAvailableCheckEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class KitAvailableCheckEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Fired when EssentialsC checks whether a kit is available to a player.

Use setAvailable(boolean) and setDenialReason(String) to override the outcome, or cancel the event to force-deny the claim.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.bukkit.event.Event

    org.bukkit.event.Event.Result
  • Constructor Summary

    Constructors
    Constructor
    Description
    KitAvailableCheckEvent(org.bukkit.entity.Player player, Kit kit, boolean available, String denialReason)
    Creates a new availability check event.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the denial reason shown when the kit is unavailable.
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    Returns the kit being checked.
    org.bukkit.entity.Player
    Returns the player being checked.
    boolean
    Returns whether the kit is currently available to the player.
    boolean
     
    void
    setAvailable(boolean available)
    Overrides whether the kit is available.
    void
    setCancelled(boolean cancel)
     
    void
    setDenialReason(String denialReason)
    Sets the denial reason shown when the kit is unavailable.

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • KitAvailableCheckEvent

      public KitAvailableCheckEvent(org.bukkit.entity.Player player, Kit kit, boolean available, String denialReason)
      Creates a new availability check event.
      Parameters:
      player - the player being checked
      kit - the kit being checked
      available - the current outcome
      denialReason - the current denial reason, or null if available
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Returns the player being checked.
      Returns:
      the player
    • getKit

      public Kit getKit()
      Returns the kit being checked.
      Returns:
      the kit
    • isAvailable

      public boolean isAvailable()
      Returns whether the kit is currently available to the player.
      Returns:
      true if available
    • setAvailable

      public void setAvailable(boolean available)
      Overrides whether the kit is available.
      Parameters:
      available - the new outcome
    • getDenialReason

      public String getDenialReason()
      Returns the denial reason shown when the kit is unavailable.
      Returns:
      the denial reason, or null
    • setDenialReason

      public void setDenialReason(String denialReason)
      Sets the denial reason shown when the kit is unavailable.
      Parameters:
      denialReason - the new denial reason
    • isCancelled

      public boolean isCancelled()
      Specified by:
      isCancelled in interface org.bukkit.event.Cancellable
    • setCancelled

      public void setCancelled(boolean cancel)
      Specified by:
      setCancelled in interface org.bukkit.event.Cancellable
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Specified by:
      getHandlers in class org.bukkit.event.Event
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()