Class HeirloomItemCraftedEvent

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

public class HeirloomItemCraftedEvent extends org.bukkit.event.Event implements org.bukkit.event.Cancellable
Called when an item is crafted at a Heirloom cooking station. Addons can modify the output or cancel the craft.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    HeirloomItemCraftedEvent(org.bukkit.entity.Player player, CookingStation station, String recipeId, org.bukkit.inventory.ItemStack result)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.bukkit.event.HandlerList
     
    org.bukkit.event.HandlerList
     
    org.bukkit.entity.Player
    Get the player who crafted the item.
    Get the recipe ID that was used.
    org.bukkit.inventory.ItemStack
    Get the crafted item result.
    Get the cooking station type where this was crafted.
    boolean
     
    void
    setCancelled(boolean cancelled)
     
    void
    setResult(org.bukkit.inventory.ItemStack result)
    Set a modified result.

    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

    • HeirloomItemCraftedEvent

      public HeirloomItemCraftedEvent(org.bukkit.entity.Player player, CookingStation station, String recipeId, org.bukkit.inventory.ItemStack result)
  • Method Details

    • getPlayer

      public org.bukkit.entity.Player getPlayer()
      Get the player who crafted the item.
    • getStation

      public CookingStation getStation()
      Get the cooking station type where this was crafted.
    • getRecipeId

      public String getRecipeId()
      Get the recipe ID that was used.
    • getResult

      public org.bukkit.inventory.ItemStack getResult()
      Get the crafted item result.
    • setResult

      public void setResult(org.bukkit.inventory.ItemStack result)
      Set a modified result. Use this to change the output item.
    • 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()