001    package org.bukkit.block;
002    
003    import org.bukkit.projectiles.BlockProjectileSource;
004    
005    /**
006     * Represents a dispenser.
007     */
008    public interface Dispenser extends BlockState, ContainerBlock {
009    
010        /**
011         * Gets the BlockProjectileSource object for this dispenser.
012         * <p>
013         * If the block is no longer a dispenser, this will return null.
014         *
015         * @return a BlockProjectileSource if valid, otherwise null
016         */
017        public BlockProjectileSource getBlockProjectileSource();
018    
019        /**
020         * Attempts to dispense the contents of this block.
021         * <p>
022         * If the block is no longer a dispenser, this will return false.
023         *
024         * @return true if successful, otherwise false
025         */
026        public boolean dispense();
027    }