Class FarmerItemCollectEvent

java.lang.Object
org.bukkit.event.Event
xyz.geik.farmer.api.handlers.FarmerItemCollectEvent

public class FarmerItemCollectEvent extends org.bukkit.event.Event
FarmerItemCollectEvent fires when Farmer collects an item
Author:
poyrazinan
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    FarmerItemCollectEvent(Farmer farmer, org.bukkit.inventory.ItemStack item, int collectAmount, org.bukkit.event.entity.ItemSpawnEvent event)
    FarmerItemCollectEvent constructor which takes farmer, item, collectAmount and event as parameters
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
    Spigot handlers requirement * @return handler list
    org.bukkit.event.HandlerList
    Spigot handlers requirement
    void
    setCancelled(boolean status)
    Cancels the event

    Methods inherited from class org.bukkit.event.Event

    getEventName, isAsynchronous

    Methods inherited from class java.lang.Object

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

    • FarmerItemCollectEvent

      public FarmerItemCollectEvent(Farmer farmer, org.bukkit.inventory.ItemStack item, int collectAmount, org.bukkit.event.entity.ItemSpawnEvent event)
      FarmerItemCollectEvent constructor which takes farmer, item, collectAmount and event as parameters

      Event can be cancelable

      Parameters:
      farmer - Farmer object which collects the item
      item - Item which is collected
      collectAmount - Amount of item which is collected
      event - Inherited class
      See Also:
      • ItemSpawnEvent
      • Farmer
      • ItemStack
  • Method Details

    • setCancelled

      public void setCancelled(boolean status)
      Cancels the event
      Parameters:
      status - status of cancel, true for cancel
    • getHandlers

      public org.bukkit.event.HandlerList getHandlers()
      Spigot handlers requirement
      Specified by:
      getHandlers in class org.bukkit.event.Event
      Returns:
      handler list
    • getHandlerList

      public static org.bukkit.event.HandlerList getHandlerList()
      Spigot handlers requirement * @return handler list
      Returns:
      HandlerList list