removePersistantDataIf

fun removePersistantDataIf(key: NamespacedKey, condition: Boolean = false): ItemBuilder(source)

Removes persistent data from the item if the condition is true.

Return

the ItemBuilder with the persistent data removed (or unchanged if the condition is false)

Parameters

key

the NamespacedKey used to identify the persistent data

condition

the condition to check before removing the data (defaults to false)