Package org.bukkit.event.inventory
Class PrepareItemCraftEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- org.bukkit.event.inventory.InventoryEvent
-
- org.bukkit.event.inventory.PrepareItemCraftEvent
-
public class PrepareItemCraftEvent extends InventoryEvent
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
-
-
Field Summary
-
Fields inherited from class org.bukkit.event.inventory.InventoryEvent
transaction
-
-
Constructor Summary
Constructors Constructor Description PrepareItemCraftEvent(@NotNull CraftingInventory what, @NotNull InventoryView view, boolean isRepair)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull HandlerList
getHandlerList()
@NotNull HandlerList
getHandlers()
@NotNull CraftingInventory
getInventory()
Gets the primary Inventory involved in this transaction@Nullable Recipe
getRecipe()
Get the recipe that has been formed.boolean
isRepair()
Check if this event was triggered by a tool repair operation rather than a crafting recipe.-
Methods inherited from class org.bukkit.event.inventory.InventoryEvent
getView, getViewers
-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Constructor Detail
-
PrepareItemCraftEvent
public PrepareItemCraftEvent(@NotNull @NotNull CraftingInventory what, @NotNull @NotNull InventoryView view, boolean isRepair)
-
-
Method Detail
-
getRecipe
@Nullable public @Nullable Recipe getRecipe()
Get the recipe that has been formed. If this event was triggered by a tool repair, this will be a temporary shapeless recipe representing the repair.- Returns:
- The recipe being crafted.
-
getInventory
@NotNull public @NotNull CraftingInventory getInventory()
Description copied from class:InventoryEvent
Gets the primary Inventory involved in this transaction- Overrides:
getInventory
in classInventoryEvent
- Returns:
- The crafting inventory on which the recipe was formed.
-
isRepair
public boolean isRepair()
Check if this event was triggered by a tool repair operation rather than a crafting recipe.- Returns:
- True if this is a repair.
-
getHandlers
@NotNull public @NotNull HandlerList getHandlers()
- Overrides:
getHandlers
in classInventoryEvent
-
getHandlerList
@NotNull public static @NotNull HandlerList getHandlerList()
-
-