org.bukkit.event.player
Class PlayerItemBreakEvent

java.lang.Object
  extended by org.bukkit.event.Event
      extended by org.bukkit.event.player.PlayerEvent
          extended by org.bukkit.event.player.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.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result
 
Field Summary
 
Fields inherited from class org.bukkit.event.player.PlayerEvent
player
 
Constructor Summary
PlayerItemBreakEvent(Player player, ItemStack brokenItem)
           
 
Method Summary
 ItemStack getBrokenItem()
          Gets the item that broke
static HandlerList getHandlerList()
           
 HandlerList getHandlers()
           
 
Methods inherited from class org.bukkit.event.player.PlayerEvent
getPlayer
 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlayerItemBreakEvent

public PlayerItemBreakEvent(Player player,
                            ItemStack brokenItem)
Method Detail

getBrokenItem

public ItemStack getBrokenItem()
Gets the item that broke

Returns:
The broken item

getHandlers

public HandlerList getHandlers()
Specified by:
getHandlers in class Event

getHandlerList

public static HandlerList getHandlerList()


Copyright © 2013. All Rights Reserved.