blob: 2741625db6db6b82449807437b861241a02e96f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package org.bukkit.block;
import org.bukkit.Nameable;
import org.bukkit.loot.Lootable;
import org.bukkit.projectiles.BlockProjectileSource;
/**
* Represents a captured state of a dispenser.
*/
public interface Dispenser extends Container, Nameable, Lootable {
/**
* Gets the BlockProjectileSource object for the dispenser.
* <p>
* If the block represented by this state is no longer a dispenser, this
* will return null.
*
* @return a BlockProjectileSource if valid, otherwise null
* @throws IllegalStateException if this block state is not placed
*/
public BlockProjectileSource getBlockProjectileSource();
/**
* Attempts to dispense the contents of the dispenser.
* <p>
* If the block represented by this state is no longer a dispenser, this
* will return false.
*
* @return true if successful, otherwise false
* @throws IllegalStateException if this block state is not placed
*/
public boolean dispense();
}
|