Class AnvilRepairEvent


public class AnvilRepairEvent extends PlayerEvent
Fired when the player removes a "repaired" item from the Anvil's Output slot. breakChance specifies as a percentage the chance that the anvil will be "damaged" when used. ItemStacks are the inputs/output from the anvil. They cannot be edited.
  • Field Details

    • left

      @Nonnull private final ItemStack left
    • output

      @Nonnull private final ItemStack output
    • breakChance

      private float breakChance
  • Constructor Details

  • Method Details

    • getItemResult

      @Nonnull public ItemStack getItemResult()
      Get the output result from the anvil
      Returns:
      the output
    • getItemInput

      @Nonnull public ItemStack getItemInput()
      Get the first item input into the anvil
      Returns:
      the first input slot
    • getIngredientInput

      @Nonnull public ItemStack getIngredientInput()
      Get the second item input into the anvil
      Returns:
      the second input slot
    • getBreakChance

      public float getBreakChance()
    • setBreakChance

      public void setBreakChance(float breakChance)