use of org.bukkit.block.Dispenser in project TotalFreedomMod by TotalFreedom.
the class Command_dispfill method setDispenserContents.
private static void setDispenserContents(final Block targetBlock, final ItemStack[] items) {
if (targetBlock.getType() == Material.DISPENSER) {
final Inventory dispenserInv = ((Dispenser) targetBlock.getState()).getInventory();
dispenserInv.clear();
dispenserInv.addItem(items);
}
}