Class BlockDropHeadEvent
- java.lang.Object
 - 
- org.bukkit.event.Event
 - 
- org.bukkit.event.block.BlockEvent
 - 
- org.shininet.bukkit.playerheads.events.BlockDropHeadEvent
 
 
 
 
- 
- All Implemented Interfaces:
 Cancellable,DropHeadEvent
public class BlockDropHeadEvent extends BlockEvent implements Cancellable, DropHeadEvent
Event created by the PlayerHeads plugin when a block is broken by hand (mined) and dropping a head. Note: does not occur when broken by water or pistons.- Since:
 - 4.8.5-SNAPSHOT
 - Author:
 - crashdemons (crashenator at gmail.com)
 
 
- 
- 
Nested Class Summary
- 
Nested classes/interfaces inherited from class org.bukkit.event.Event
Event.Result 
 - 
 
- 
Field Summary
- 
Fields inherited from class org.bukkit.event.block.BlockEvent
block 
 - 
 
- 
Constructor Summary
Constructors Constructor Description BlockDropHeadEvent(Block block, ItemStack drop)Construct the event 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemStackgetDrop()Gets the item that will drop from the mined block.static HandlerListgetHandlerList()Get a list of handlers for the event.HandlerListgetHandlers()Get a list of handlers for the event.booleanisCancelled()Whether the event has been cancelled.voidsetCancelled(boolean cancel)Sets whether the event should be cancelled.voidsetDrop(ItemStack stack)Sets the item that will drop from the mined block.- 
Methods inherited from class org.bukkit.event.block.BlockEvent
getBlock 
- 
Methods inherited from class org.bukkit.event.Event
getEventName, isAsynchronous 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getDrop
public ItemStack getDrop()
Gets the item that will drop from the mined block.- Specified by:
 getDropin interfaceDropHeadEvent- Returns:
 - mutable ItemStack that will drop into the world once this event is over
 
 
- 
setDrop
public void setDrop(@Nullable ItemStack stack)
Sets the item that will drop from the mined block. 5.2+ API- Specified by:
 setDropin interfaceDropHeadEvent- Parameters:
 stack- the stack to drop. If this is null, no item will be dropped, but the drop event will complete successfully as if one did. (cancel the event to stop the drop).- Since:
 - 5.2.0-SNAPSHOT
 
 
- 
isCancelled
public boolean isCancelled()
Whether the event has been cancelled.- Specified by:
 isCancelledin interfaceCancellable- Returns:
 - Whether the event has been cancelled.
 
 
- 
setCancelled
public void setCancelled(boolean cancel)
Sets whether the event should be cancelled.- Specified by:
 setCancelledin interfaceCancellable- Parameters:
 cancel- whether the event should be cancelled.
 
- 
getHandlers
public HandlerList getHandlers()
Get a list of handlers for the event.- Specified by:
 getHandlersin classEvent- Returns:
 - a list of handlers for the event
 
 
- 
getHandlerList
public static HandlerList getHandlerList()
Get a list of handlers for the event.- Returns:
 - a list of handlers for the event
 
 
 - 
 
 -