Files
DeltaZern/paper-api/src/main/java/org/bukkit/block/Dispenser.java
T
Aikar 397d3cac4b LootTable API
Provides API to control what Loot Table an object uses.

Also provides an Event to control if a lootable inventory should
auto replenish for a player.

Provides methods to determine players looted state for an object
2016-05-01 15:19:49 -04:00

37 lines
1.1 KiB
Java

package org.bukkit.block;
import com.destroystokyo.paper.loottable.LootableBlockInventory;
import org.bukkit.Nameable;
import org.bukkit.loot.Lootable;
import org.bukkit.projectiles.BlockProjectileSource;
import org.jetbrains.annotations.Nullable;
/**
* Represents a captured state of a dispenser.
*/
public interface Dispenser extends Container, Nameable, LootableBlockInventory { // Paper
/**
* 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
*/
@Nullable
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();
}