Class PlayerItemBreakEvent


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

    The item that's breaking will exist in the inventory with a stack size of 0. After the event, the item's durability will be reset to 0.

    • Constructor Detail

      • PlayerItemBreakEvent

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

      • getBrokenItem

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

        @NotNull
        public static HandlerList getHandlerList()