toItemStack

fun toItemStack(): ItemStack

Converts the button's material, display name, and custom data into an ItemStack.

Return

An ItemStack representing the visual and data properties of this button.