Class HeirloomCropHarvestedEvent

java.lang.Object
org.bukkit.event.Event
ke.ric.api.events.HeirloomCropHarvestedEvent
All Implemented Interfaces:
org.bukkit.event.Cancellable

public class HeirloomCropHarvestedEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when a player harvests a Heirloom crop. Addons can modify the drops or add bonus items.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    HeirloomCropHarvestedEvent(org.bukkit.entity.Player player, org.bukkit.Location location, CropDefinition cropDefinition, List<org.bukkit.inventory.ItemStack> drops, boolean willReplant)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addDrop(org.bukkit.inventory.ItemStack item)
    Add an additional drop item.
    Get the crop definition.
    Get the crop ID.
    List<org.bukkit.inventory.ItemStack>
    Get the items that will be dropped.
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.Location
    Get the location where the crop was harvested.
    org.bukkit.entity.Player
    Get the player who harvested the crop.
    boolean
     
    void
    setCancelled(boolean cancelled)
     
    void
    setDrops(List<org.bukkit.inventory.ItemStack> drops)
    Set the items to drop.
    void
    setWillReplant(boolean replant)
    Set whether the crop should replant.
    boolean
    Check if the crop will replant after harvest.

    Methods inherited from class org.bukkit.event.Event

    callEvent, getEventName, isAsynchronous

    Methods inherited from class Object

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

    • HeirloomCropHarvestedEvent

      public HeirloomCropHarvestedEvent(org.bukkit.entity.Player player, org.bukkit.Location location, CropDefinition cropDefinition, List<org.bukkit.inventory.ItemStack> drops, boolean willReplant)
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Get the player who harvested the crop.
    • getLocation

      public org.bukkit.Location getLocation()
      Get the location where the crop was harvested.
    • getCropDefinition

      public CropDefinition getCropDefinition()
      Get the crop definition.
    • getCropId

      public String getCropId()
      Get the crop ID.
    • getDrops

      public List<org.bukkit.inventory.ItemStack> getDrops()
      Get the items that will be dropped.
    • setDrops

      public void setDrops(List<org.bukkit.inventory.ItemStack> drops)
      Set the items to drop.
    • addDrop

      public void addDrop(org.bukkit.inventory.ItemStack item)
      Add an additional drop item.
    • willReplant

      public boolean willReplant()
      Check if the crop will replant after harvest.
    • setWillReplant

      public void setWillReplant(boolean replant)
      Set whether the crop should replant.
    • isCancelled

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

      public void setCancelled(boolean cancelled)
      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()