Class PrepareItemCraftEvent


public class PrepareItemCraftEvent extends InventoryEvent
  • Constructor Details

    • PrepareItemCraftEvent

      @Internal public PrepareItemCraftEvent(@NotNull @NotNull CraftingInventory matrix, @NotNull @NotNull InventoryView view, boolean isRepair)
  • Method Details

    • 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 class InventoryEvent
      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 class InventoryEvent
    • getHandlerList

      @NotNull public static @NotNull HandlerList getHandlerList()