Package org.bukkit.event.block
Class BlockDropItemEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockDropItemEvent
- All Implemented Interfaces:
- Cancellable
Called if a block broken by a player drops an item.
 If the block break is cancelled, this event won't be called.
 If isDropItems in BlockBreakEvent is set to false, this event won't be
 called.
 This event will also be called if the player breaks a multi block structure,
 for example a torch on top of a stone. Both items will have an event call.
 The Block is already broken as this event is called, so #getBlock() will be
 AIR in most cases. Use #getBlockState() for more Information about the broken
 block.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.block.BlockEventblock
- 
Constructor SummaryConstructorsConstructorDescriptionBlockDropItemEvent(Block block, BlockState blockState, Player player, List<Item> items) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the BlockState of the block involved in this event before it was broken.static HandlerListgetItems()Gets list of the Item drops caused by the block break.Gets the Player that is breaking the block involved in this event.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancel) Sets the cancellation state of this event.Methods inherited from class org.bukkit.event.block.BlockEventgetBlockMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
BlockDropItemEvent
 
- 
- 
Method Details- 
getPlayerGets the Player that is breaking the block involved in this event.- Returns:
- The Player that is breaking the block involved in this event
 
- 
getBlockStateGets the BlockState of the block involved in this event before it was broken.- Returns:
- The BlockState of the block involved in this event
 
- 
getItemsGets list of the Item drops caused by the block break. This list is mutable - removing an item from it will cause it to not drop. It is not legal however to add new items to the list.- Returns:
- The Item the block caused to drop
 
- 
isCancelledpublic boolean isCancelled()Description copied from interface:CancellableGets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins- Specified by:
- isCancelledin interface- Cancellable
- Returns:
- true if this event is cancelled
 
- 
setCancelledpublic void setCancelled(boolean cancel) Description copied from interface:CancellableSets the cancellation state of this event. A cancelled event will not be executed in the server, but will still pass to other plugins.- Specified by:
- setCancelledin interface- Cancellable
- Parameters:
- cancel- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-