dropItem

abstract fun dropItem(itemStack: ItemStack)

Drops an item naturally at the block's location.

The item will be spawned at the block's location as if it was dropped naturally (with random velocity).

Parameters

itemStack

The item stack to drop.

Example:

blockEditor {
dropItem(ItemStack(Material.EMERALD, 3))
dropItem(ItemStack(Material.GOLD_INGOT, 1))
}