public class BlockDispenseEvent extends BlockEvent implements Cancellable
If a Block Dispense event is cancelled, the block will not dispense the item.
Event.Resultblock| Constructor and Description | 
|---|
| BlockDispenseEvent(Block block,
                  ItemStack dispensed,
                  Vector velocity) | 
| Modifier and Type | Method and Description | 
|---|---|
| static HandlerList | getHandlerList() | 
| HandlerList | getHandlers() | 
| ItemStack | getItem()Gets the item that is being dispensed. | 
| Vector | getVelocity()Gets the velocity. | 
| boolean | isCancelled()Gets the cancellation state of this event. | 
| void | setCancelled(boolean cancel)Sets the cancellation state of this event. | 
| void | setItem(ItemStack item)Sets the item being dispensed. | 
| void | setVelocity(Vector vel)Sets the velocity of the item being dispensed. | 
getBlockgetEventName, isAsynchronouspublic ItemStack getItem()
setItem(org.bukkit.inventory.ItemStack) instead.public void setItem(ItemStack item)
item - the item being dispensedpublic Vector getVelocity()
 Note: Modifying the returned Vector will not change the velocity, you
 must use setVelocity(org.bukkit.util.Vector) instead.
public void setVelocity(Vector vel)
vel - the velocity of the item being dispensedpublic boolean isCancelled()
CancellableisCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
CancellablesetCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
Copyright © 2015. All rights reserved.