Package org.bukkit.event.inventory
Class CraftItemEvent
- java.lang.Object
-
- org.bukkit.event.Event
-
- org.bukkit.event.inventory.InventoryEvent
-
- org.bukkit.event.inventory.InventoryInteractEvent
-
- org.bukkit.event.inventory.InventoryClickEvent
-
- org.bukkit.event.inventory.CraftItemEvent
-
- All Implemented Interfaces:
Cancellable
public class CraftItemEvent extends InventoryClickEvent
Called when the recipe of an Item is completed inside a crafting matrix.
-
-
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 CraftItemEvent(@NotNull Recipe recipe, @NotNull InventoryView what, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action)
CraftItemEvent(@NotNull Recipe recipe, @NotNull InventoryView what, @NotNull InventoryType.SlotType type, int slot, @NotNull ClickType click, @NotNull InventoryAction action, int key)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull CraftingInventory
getInventory()
Gets the primary Inventory involved in this transaction@NotNull Recipe
getRecipe()
-
Methods inherited from class org.bukkit.event.inventory.InventoryClickEvent
getAction, getClick, getClickedInventory, getCurrentItem, getCursor, getHandlerList, getHandlers, getHotbarButton, getRawSlot, getSlot, getSlotType, isLeftClick, isRightClick, isShiftClick, setCurrentItem, setCursor
-
Methods inherited from class org.bukkit.event.inventory.InventoryInteractEvent
getResult, getWhoClicked, isCancelled, setCancelled, setResult
-
Methods inherited from class org.bukkit.event.inventory.InventoryEvent
getView, getViewers
-
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
-
-
-
-
Constructor Detail
-
CraftItemEvent
public CraftItemEvent(@NotNull @NotNull Recipe recipe, @NotNull @NotNull InventoryView what, @NotNull @NotNull InventoryType.SlotType type, int slot, @NotNull @NotNull ClickType click, @NotNull @NotNull InventoryAction action)
-
CraftItemEvent
public CraftItemEvent(@NotNull @NotNull Recipe recipe, @NotNull @NotNull InventoryView what, @NotNull @NotNull InventoryType.SlotType type, int slot, @NotNull @NotNull ClickType click, @NotNull @NotNull InventoryAction action, int key)
-
-
Method Detail
-
getRecipe
@NotNull public @NotNull Recipe getRecipe()
- Returns:
- A copy of the current recipe on the crafting matrix.
-
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 upper inventory.
-
-