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

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

    • getBrokenItem

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

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

      @NotNull public static @NotNull HandlerList getHandlerList()