getValue

open operator fun getValue(thisRef: Any?, property: KProperty<*>): C?(source)

Retrieves the value associated with the given key and type from the container.

This operator function allows the delegate pattern to be used for accessing values stored in the PersistentDataContainer with a specific key and PersistentDataType.

Return

The value retrieved from the container, or null if no value is associated with the key.

Parameters

thisRef

The reference of the object that contains this property (nullable).

property

A descriptor for the property associated with this delegate. Used primarily as metadata to identify the property being accessed.