Interface PlayerCraftItemEvent

All Superinterfaces:
Cancellable, Event, PlayerEvent

public interface PlayerCraftItemEvent extends PlayerEvent, Cancellable
Fired when a player takes the result of a craft, before the ingredients are taken from the grid.

A shift-click crafts as many times as it can: the event fires once per craft. Cancelling it leaves the grid untouched and gives nothing.

Since:
0.1.0
  • Method Details

    • match

      CraftingMatch match()
      Returns the recipe being crafted, and what it takes from the grid.
      Returns:
      the recipe being crafted, and what it takes from the grid
      Since:
      0.1.0
    • result

      ItemStack result()
      Returns what the player gets.
      Returns:
      what the player gets
      Since:
      0.1.0
    • shiftClick

      boolean shiftClick()
      Returns whether the player shift-clicked to craft as many as possible.
      Returns:
      whether the player shift-clicked to craft as many as possible
      Since:
      0.1.0