add Persistent Data
Adds persistent data to the item.
Return
The updated ItemBuilder object.
Parameters
key
The key used to identify the persistent data.
value
The value of the persistent data.
fun <T : Any> addPersistentData(key: NamespacedKey, persistentDataType: PersistentDataType<T, T>, value: T): ItemBuilder(source)
Adds persistent data to the item stack.
Return
The updated ItemBuilder instance.
Parameters
key
The namespaced key to associate with the data.
persistent Data Type
The type of the persistent data.
value
The value of the persistent data.