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

      @NotNull private final @NotNull ItemStack left
    • output

      @NotNull private final @NotNull ItemStack output
    • breakChance

      private float breakChance
  • Constructor Details

    • AnvilRepairEvent

      public AnvilRepairEvent(Player player, @NotNull @NotNull ItemStack left, @NotNull @NotNull ItemStack right, @NotNull @NotNull ItemStack output)
  • Method Details

    • getOutput

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

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

      @NotNull public @NotNull 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)