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

    • PlayerItemBreakEvent

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

    • getBrokenItem

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

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

      @NotNull public static HandlerList getHandlerList()