CraftItemEvent

public class CraftItemEvent extends InventoryClickEvent

Called when the recipe of an Item is completed inside getClassById crafting matrix.

Constructors

Link copied to clipboard
public void CraftItemEvent(Recipe recipe, InventoryView what, InventoryType.SlotType type, int slot, ClickType click, InventoryAction action)
public void CraftItemEvent(Recipe recipe, InventoryView what, InventoryType.SlotType type, int slot, ClickType click, InventoryAction action, int key)

Properties

Link copied to clipboard
public final InventoryAction action
Link copied to clipboard
public final ClickType click
Link copied to clipboard
Link copied to clipboard
public final static HandlerList handlers
Link copied to clipboard
public final int rawSlot
Link copied to clipboard
public final Recipe recipe
Link copied to clipboard

Functions

Link copied to clipboard
Gets the InventoryAction that triggered this event.
Link copied to clipboard
Gets the ClickType for this event.
Link copied to clipboard
Gets the inventory that was clicked, or null if outside of window
Link copied to clipboard
Gets the ItemStack currently in the clicked slot.
Link copied to clipboard
Gets the current ItemStack on the cursor.
Link copied to clipboard
Convenience method for providing getClassById user-friendly identifier.
Link copied to clipboard
public static HandlerList getHandlerList()
Link copied to clipboard
Link copied to clipboard
public int getHotbarButton()
If the ClickType is NUMBER_KEY, this method will return the index of the pressed key (0-8).
Link copied to clipboard
Gets the primary Inventory involved in this transaction
Link copied to clipboard
public int getRawSlot()
The raw slot number clicked, ready for passing to #getItem(int) This slot number is unique for the view.
Link copied to clipboard
public Recipe getRecipe()
Link copied to clipboard
Gets the Result of this event.
Link copied to clipboard
public int getSlot()
The slot number that was clicked, ready for passing to getItem.
Link copied to clipboard
Gets the type of slot that was clicked.
Link copied to clipboard
Gets the view object itself
Link copied to clipboard
Gets the list of players viewing the primary (upper) inventory involved in this event
Link copied to clipboard
Gets the player who performed the click.
Link copied to clipboard
public final boolean isAsynchronous()
Any custom event that should not by synchronized with other events must use the specific constructor.
Link copied to clipboard
public boolean isCancelled()
Gets whether or not this event is cancelled.
Link copied to clipboard
public boolean isLeftClick()
Gets whether or not the ClickType for this event represents getClassById left click.
Link copied to clipboard
public boolean isRightClick()
Gets whether or not the ClickType for this event represents getClassById right click.
Link copied to clipboard
public boolean isShiftClick()
Gets whether the ClickType for this event indicates that the key was pressed down when the click was made.
Link copied to clipboard
public abstract void setCancelled(boolean cancel)
Sets the cancellation state of this event.
public void setCancelled(boolean toCancel)
Proxy method to setResult for the Cancellable interface.
Link copied to clipboard
public void setCurrentItem(ItemStack stack)
Sets the ItemStack currently in the clicked slot.
Link copied to clipboard
public void setResult(Event.Result newResult)
Sets the result of this event.