get Nullable
fun <P : Any, C : Any> PersistentDataContainer.getNullable(key: String, type: PersistentDataType<P, C>): C?(source)
This method is used to get the value of the specified key from the PersistentDataContainer.
This methode will convert the type to a com.fantamomo.persistent.types.NullablePersistentDataType. So it tries to read a Optional from the PersistentDataContainer. And returns the value of the Optional if it is present.
Return
The value of the specified key
Author
Fantamomo
Since
1.0-SNAPSHOT
Parameters
key
The key to get the value for.
type
The type of the value to get.