Package-level declarations

Contains classes for binding persistent data entries to containers and accessing stored values. Implements delegate-based property bindings enabling type-safe access to persistent data through Kotlin properties. Supports both read-only and mutable bindings with automatic type conversion.

Types

Link copied to clipboard
open class BoundEntry<P : Any, C : Any>

Represents a binding between a key, its associated type, and a PersistentDataContainer.

Link copied to clipboard
open class DefaultBoundEntry<P : Any, C : Any>(container: PersistentDataContainer, key: String, type: PersistentDataType<P, C>, val defaultValue: () -> C) : BoundEntry<P, C>

Represents a bound entry with a default value for a key in a PersistentDataContainer.

Link copied to clipboard

Represents a mutable binding between a key, its associated type, and a MutablePersistentDataContainer.

Link copied to clipboard
class MutableDefaultBoundEntry<P : Any, C : Any>(container: MutablePersistentDataContainer, key: String, type: PersistentDataType<P, C>, defaultValue: () -> C) : DefaultBoundEntry<P, C>

Represents a mutable default-bound entry in a MutablePersistentDataContainer.

Functions

Link copied to clipboard
@JvmName(name = "create")
fun <P : Any, C : Any> PersistentDataContainer.bound(key: String, type: PersistentDataType<P, C>): BoundEntry<P, C>

Creates a bound entry for accessing persistent data within the container.

@JvmName(name = "create")
fun <P : Any, C : Any> PersistentDataContainer.bound(key: String, type: PersistentDataType<P, C>, default: () -> C): DefaultBoundEntry<P, C>

Creates a DefaultBoundEntry that is bound to the specified PersistentDataContainer. This entry allows the retrieval of a value using the specified key and type, with the capability to provide a default value if the key does not exist in the container.

Link copied to clipboard

Creates a new instance of MutableBoundEntry that is bound to the specified MutablePersistentDataContainer, using the provided key and PersistentDataType.

@JvmName(name = "createMutable")
fun <P : Any, C : Any> MutablePersistentDataContainer.mutableBound(key: String, type: PersistentDataType<P, C>, default: () -> C): MutableDefaultBoundEntry<P, C>

Creates a mutable bound entry for a key in the given mutable persistent data container.