|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.bukkit.event.Event
org.bukkit.event.block.BlockEvent
org.bukkit.event.block.BlockDispenseEvent
public class BlockDispenseEvent
Called when an item is dispensed from a block.
If a Block Dispense event is cancelled, the block will not dispense the item.
| 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 | |
|---|---|
BlockDispenseEvent(Block block,
ItemStack dispensed,
Vector velocity)
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.bukkit.event.block.BlockEvent |
|---|
getBlock |
| 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 |
|---|
public BlockDispenseEvent(Block block,
ItemStack dispensed,
Vector velocity)
| Method Detail |
|---|
public ItemStack getItem()
setItem(org.bukkit.inventory.ItemStack) instead.
public void setItem(ItemStack item)
item - the item being dispensedpublic Vector getVelocity()
setVelocity(org.bukkit.util.Vector) instead.
public void setVelocity(Vector vel)
vel - the velocity of the item being dispensedpublic boolean isCancelled()
Cancellable
isCancelled in interface Cancellablepublic void setCancelled(boolean cancel)
Cancellable
setCancelled in interface Cancellablecancel - true if you wish to cancel this eventpublic HandlerList getHandlers()
getHandlers in class Eventpublic static HandlerList getHandlerList()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||