meta

inline fun <I : ItemMeta> ItemStack.meta(): 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 I.

Return

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

Parameters

I

the metadata type


@Contract(value = "_ -> this", mutates = "this")
inline fun ItemStack.Builder.meta(builder: ItemMeta.Builder.() -> Unit): ItemStack.Builder

Applies the given builder function to the metadata builder for this builder.

Return

this builder

Parameters

builder

the builder function to apply


@Contract(value = "_ -> this", mutates = "this")
@JvmName(name = "metaGeneric")
inline fun <B : IMB<B, P>, P : IMP<B>, ItemMeta> ItemStack.Builder.meta(builder: B.() -> Unit): ItemStack.Builder

Applies the given builder function to the metadata builder for this builder.

Return

this builder

Parameters

B

the builder type

P

the metadata type

builder

the builder function to apply