meta

abstract fun <I : ItemMeta> meta(type: Class<I>): I?

Gets the metadata for this item stack as the given type I, or returns null if the metadata could not be casted to the given type.

Return

the metadata as the type, or null if the metadata is not of the type

Parameters

I

the type of metadata

type

the type


@get:JvmName(name = "meta")
abstract val meta: ItemMeta

The metadata for this item stack.