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
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PrepareItemCraftEvent(CraftingInventory what, InventoryView view, boolean isRepair) -
Method Summary
Modifier and Type Method Description static HandlerListgetHandlerList()HandlerListgetHandlers()CraftingInventorygetInventory()Gets the primary Inventory involved in this transactionRecipegetRecipe()Get the recipe that has been formed.booleanisRepair()Check if this event was triggered by a tool repair operation rather than a crafting recipe.
-
Constructor Details
-
PrepareItemCraftEvent
public PrepareItemCraftEvent(@NotNull CraftingInventory what, @NotNull InventoryView view, boolean isRepair)
-
-
Method Details
-
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
Description copied from class:InventoryEventGets the primary Inventory involved in this transaction- Overrides:
getInventoryin 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
- Overrides:
getHandlersin classInventoryEvent
-
getHandlerList
-