[Bleeding] Add ProjectileSource interface. Addresses BUKKIT-1038, BUKKIT-1156

By: t00thpick1 <t00thpick1dirko@gmail.com>
This commit is contained in:
Bukkit/Spigot
2014-01-26 20:08:28 -05:00
parent b3c27cf60d
commit 03235e2288
6 changed files with 87 additions and 21 deletions

View File

@@ -1,14 +1,25 @@
package org.bukkit.block;
import org.bukkit.projectiles.BlockProjectileSource;
/**
* Represents a dispenser.
*/
public interface Dispenser extends BlockState, ContainerBlock {
/**
* Attempts to dispense the contents of this block
* Gets the BlockProjectileSource object for this dispenser.
* <p>
* If the block is no longer a dispenser, this will return false
* If the block is no longer a dispenser, this will return null.
*
* @return a BlockProjectileSource if valid, otherwise null
*/
public BlockProjectileSource getBlockProjectileSource();
/**
* Attempts to dispense the contents of this block.
* <p>
* If the block is no longer a dispenser, this will return false.
*
* @return true if successful, otherwise false
*/