setCustomName

inline fun ItemStack.setCustomName(baseText: String? = null, builder: LiteralTextBuilder.() -> Unit = {})(source)

Opens a LiteralTextBuilder to change the custom name of the item stack. Sets DataComponents.CUSTOM_NAME.

See also