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
ConstructorsConstructorDescriptionHeirloomItemCraftedEvent(org.bukkit.entity.Player player, CookingStation station, String recipeId, org.bukkit.inventory.ItemStack result) -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.event.HandlerListorg.bukkit.event.HandlerListorg.bukkit.entity.PlayerGet the player who crafted the item.Get the recipe ID that was used.org.bukkit.inventory.ItemStackGet the crafted item result.Get the cooking station type where this was crafted.booleanvoidsetCancelled(boolean cancelled) voidsetResult(org.bukkit.inventory.ItemStack result) Set a modified result.Methods inherited from class org.bukkit.event.Event
callEvent, getEventName, isAsynchronous
-
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
Get the cooking station type where this was crafted. -
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:
isCancelledin interfaceorg.bukkit.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.bukkit.event.Cancellable
-
getHandlers
public org.bukkit.event.HandlerList getHandlers()- Specified by:
getHandlersin classorg.bukkit.event.Event
-
getHandlerList
public static org.bukkit.event.HandlerList getHandlerList()
-