Package-level declarations

Provides container interfaces for storing and managing persistent key-value data. Defines core interfaces for common operations like get, set, remove and contains.

Types

Link copied to clipboard
Link copied to clipboard

A mutable persistent data container that allows for modification of the data.

Link copied to clipboard

A container for persistent data.

Link copied to clipboard

An interface extending PersistentDataViewProvider to provide a mutable persistent data container.

Link copied to clipboard

Represents a provider that offers an immutable view of persistent data.

Functions

Link copied to clipboard

Builds a new instance of PersistentDataContainer using the specified configuration action.

Link copied to clipboard
inline fun MutablePersistentDataContainer.bulk(replace: Boolean = true, removeEntries: Boolean = replace, action: MutablePersistentDataContainer.() -> Unit)

This methode is used to make a bulk operation on the MutablePersistentDataContainer.

Link copied to clipboard

This methode copies all key-value pairs from the PersistentDataContainer to the receiver.

Link copied to clipboard

This methode is used to get the direct value of the key.

Link copied to clipboard

This method is used to get the value of the specified key from the PersistentDataContainer.

Link copied to clipboard
fun <P : Any, C : Any> PersistentDataContainer.getOrDefault(key: String, type: PersistentDataType<P, C>, default: C): C
fun <P : Any, C : Any> PersistentDataContainer.getOrDefault(key: String, type: PersistentDataType<P, C>, default: () -> C): C

This method is used to get the value of the specified key from the PersistentDataContainer.

Link copied to clipboard

This methode is uses to get the element by the key.

Link copied to clipboard
fun <P : Any, C : Any, T : PersistentDataType<P, C>, DefaultPersistentDataType<C>> PersistentDataContainer.getWithDefault(key: String, type: T, default: C = type.defaultValue): C

This method is used to get the value of the specified key from the PersistentDataContainer.

Link copied to clipboard

Creates and returns a new instance of a mutable persistent data container.

Link copied to clipboard

Creates an immutable instance of a PersistentDataContainer.

@JvmName(name = "fromInputStream")
fun PersistentDataContainer(input: InputStream, serializer: SerializerStrategy = SerializerStrategy): PersistentDataContainer

Creates a new instance of PersistentDataContainer by deserializing data from the provided input stream.

Link copied to clipboard
fun <P : Any, C : Any> MutablePersistentDataContainer.putAll(type: PersistentDataType<P, C>, vararg entries: Pair<String, C>)

Adds multiple entries to this container using vararg pairs.

Adds all entries from the provided map to this container.

Link copied to clipboard

Adds multiple nullable entries to this container.

Link copied to clipboard

This methode removes the value of the specified key from the PersistentDataContainer.

Link copied to clipboard

This method is used to set the value of the specified key in the PersistentDataContainer.

Link copied to clipboard
Link copied to clipboard

Converts the current PersistentDataContainer instance to an immutable implementation.

Link copied to clipboard

Converts this container's contents to a Map.

Link copied to clipboard

Attempts to retrieve a value from the persistent data container associated with the specified key and type, returning the result wrapped in a Result type.