Class AnvilCraftEvent

Direct Known Subclasses:
AnvilCraftEvent.Post, AnvilCraftEvent.Pre

public abstract class AnvilCraftEvent extends PlayerEvent
The AnvilCraftEvent is fired when the player picks up the result of an anvil operation, "crafting" it. It can be used to react to the player performing the crafting operation, and changing the side effects of doing so.

It cannot be used to modify the result of the anvil operation. To do that, use AnvilUpdateEvent.

This event is fired on both the logical server and logical client.

  • Field Details

  • Constructor Details

  • Method Details

    • getMenu

      public AnvilMenu getMenu()
      Returns the current AnvilMenu.

      This should be the same menu as Player.containerMenu.

    • getOutput

      public ItemStack getOutput()
      Returns a copy of the item stack that was picked up from the anvil output slot.
    • getLeft

      public ItemStack getLeft()
      Returns a copy of the item stack that was in the left input slot (before the crafting operation).
    • getRight

      public ItemStack getRight()
      Returns a copy of the item stack that was in the right input slot (before the crafting operation).