Class KitGiveEvent

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

public class KitGiveEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Fired when kit items are about to be given to a player.

Cancelling this event blocks the item grant. Use setItems(List) to modify which items are handed out.

  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    KitGiveEvent(org.bukkit.entity.Player player, Kit kit, List<org.bukkit.inventory.ItemStack> items)
    Creates a new kit give event.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    List<org.bukkit.inventory.ItemStack>
    Returns a copy of the items about to be given.
    Returns the kit being granted.
    org.bukkit.entity.Player
    Returns the receiving player.
    boolean
     
    void
    setCancelled(boolean cancel)
     
    void
    setItems(List<org.bukkit.inventory.ItemStack> items)
    Replaces the items that will be given.

    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

    • KitGiveEvent

      public KitGiveEvent(org.bukkit.entity.Player player, Kit kit, List<org.bukkit.inventory.ItemStack> items)
      Creates a new kit give event.
      Parameters:
      player - the receiving player
      kit - the kit being granted
      items - the items about to be given
  • Method Details

    • getPlayer

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

      public Kit getKit()
      Returns the kit being granted.
      Returns:
      the kit
    • getItems

      public List<org.bukkit.inventory.ItemStack> getItems()
      Returns a copy of the items about to be given.
      Returns:
      the items
    • setItems

      public void setItems(List<org.bukkit.inventory.ItemStack> items)
      Replaces the items that will be given.
      Parameters:
      items - the new items
    • 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()