Package org.bukkit.event.block
Class BlockDispenseLootEvent
java.lang.Object
org.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockDispenseLootEvent
- All Implemented Interfaces:
- Cancellable
Called when a block dispenses loot from its designated LootTable. This is not
 to be confused with events like 
Example: A player unlocks a trial chamber vault and the vault block dispenses its loot.
BlockDispenseEvent which fires when a
 singular item is dispensed from its inventory container.
 Example: A player unlocks a trial chamber vault and the vault block dispenses its loot.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.bukkit.event.EventEvent.Result
- 
Field SummaryFields inherited from class org.bukkit.event.block.BlockEventblock
- 
Constructor SummaryConstructorsConstructorDescriptionBlockDispenseLootEvent(Player player, Block theBlock, List<ItemStack> dispensedLoot) 
- 
Method SummaryModifier and TypeMethodDescriptionGets the loot that will be dispensed.static HandlerListGets the player associated with this event.booleanGets the cancellation state of this event.voidsetCancelled(boolean cancelled) Sets the cancellation state of this event.voidsetDispensedLoot(List<ItemStack> dispensedLoot) Sets the loot that will be dispensed.Methods inherited from class org.bukkit.event.block.BlockEventgetBlockMethods inherited from class org.bukkit.event.EventgetEventName, isAsynchronous
- 
Constructor Details- 
BlockDispenseLootEvent
 
- 
- 
Method Details- 
getDispensedLootGets the loot that will be dispensed.- Returns:
- the loot that will be dispensed
 
- 
setDispensedLootSets the loot that will be dispensed.- Parameters:
- dispensedLoot- new loot to dispense
 
- 
getPlayerGets the player associated with this event.
 Warning: Some event instances like aTrialSpawnerdispensing its reward loot may not have a player associated with them and will return null.- Returns:
- the player who unlocked the vault
 
- 
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 cancelled) 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:
- cancelled- true if you wish to cancel this event
 
- 
getHandlers- Specified by:
- getHandlersin class- Event
 
- 
getHandlerList
 
-