类 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.
  • 字段详细资料

    • left

      @NotNull private final @NotNull ItemStack left
    • output

      @NotNull private final @NotNull ItemStack output
    • breakChance

      private float breakChance
  • 构造器详细资料

    • AnvilRepairEvent

      public AnvilRepairEvent(Player player, @NotNull @NotNull ItemStack left, @NotNull @NotNull ItemStack right, @NotNull @NotNull ItemStack output)
  • 方法详细资料

    • getOutput

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

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

      @NotNull public @NotNull ItemStack getRight()
      Get the second item input into the anvil
      返回:
      the second input slot
    • getBreakChance

      public float getBreakChance()
    • setBreakChance

      public void setBreakChance(float breakChance)