org.bukkit.block
Interface Dispenser

All Superinterfaces:
BlockState, ContainerBlock, InventoryHolder, Metadatable

public interface Dispenser
extends BlockState, ContainerBlock

Represents a dispenser.


Method Summary
 boolean dispense()
          Attempts to dispense the contents of this block.
 BlockProjectileSource getBlockProjectileSource()
          Gets the BlockProjectileSource object for this dispenser.
 
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getChunk, getData, getLightLevel, getLocation, getLocation, getRawData, getType, getTypeId, getWorld, getX, getY, getZ, setData, setRawData, setType, setTypeId, update, update, update
 
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
 
Methods inherited from interface org.bukkit.inventory.InventoryHolder
getInventory
 

Method Detail

getBlockProjectileSource

BlockProjectileSource getBlockProjectileSource()
Gets the BlockProjectileSource object for this dispenser.

If the block is no longer a dispenser, this will return null.

Returns:
a BlockProjectileSource if valid, otherwise null

dispense

boolean dispense()
Attempts to dispense the contents of this block.

If the block is no longer a dispenser, this will return false.

Returns:
true if successful, otherwise false


Copyright © 2014. All rights reserved.