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

      private final ItemStack left
    • output

      private final ItemStack output
    • breakChance

      private float breakChance
  • Constructor Details

  • Method Details

    • getOutput

      public ItemStack getOutput()
      Get the output result from the anvil
      Returns:
      the output
    • getLeft

      public ItemStack getLeft()
      Get the first item input into the anvil
      Returns:
      the first input slot
    • getRight

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

      public float getBreakChance()
    • setBreakChance

      public void setBreakChance(float breakChance)