of

@Contract(value = "_ -> new", pure = true)
fun of(type: ItemType): ItemStack

Creates a new item stack with the given type.

Return

a new item stack

Parameters

type

the type


@Contract(value = "_, _ -> new", pure = true)
fun of(type: ItemType, amount: Int): ItemStack

Creates a new item stack with the given type and amount.

Return

a new item stack

Parameters

type

the item type

amount

the amount of items