set Nullable
fun <P : Any, C : Any> MutablePersistentDataContainer.setNullable(key: String, type: PersistentDataType<P, C>, value: C?)(source)
This method is used to set the value of the specified key in the PersistentDataContainer.
This methode will convert the type to a com.fantamomo.persistent.types.NullablePersistentDataType. So if the value is null, it will set an empty Optional.
Author
Fantamomo
Since
1.0-SNAPSHOT
Parameters
key
The key to set the value for.
type
The type of the value to set.
value
The value to set.