Class PlayerItemBreakEvent


public class PlayerItemBreakEvent extends PlayerEvent
Fired when a player's item breaks (such as a shovel or flint and steel).

After this event, the item's amount will be set to item amount - 1 and its durability will be reset to 0.

  • Constructor Details Link icon

    • PlayerItemBreakEvent Link icon

      public PlayerItemBreakEvent(@NotNull Player player, @NotNull ItemStack brokenItem)
  • Method Details Link icon

    • getBrokenItem Link icon

      @NotNull public ItemStack getBrokenItem()
      Gets the item that broke
      Returns:
      The broken item
    • getHandlers Link icon

      @NotNull public HandlerList getHandlers()
      Specified by:
      getHandlers in class Event
    • getHandlerList Link icon

      @NotNull public static HandlerList getHandlerList()