KeyedPersistentDataType

abstract class KeyedPersistentDataType<T : Keyed>(val type: Class<T>) : PersistentDataType<String, T> (source)

A PersistentDataType that can be used with any class that implements Keyed.

Constructors

Link copied to clipboard
constructor(type: Class<T>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val type: Class<T>

Functions

Link copied to clipboard
open override fun fromPrimitive(primitive: String, context: PersistentDataAdapterContext): T
Link copied to clipboard
open override fun getComplexType(): Class<T>
Link copied to clipboard
open override fun getPrimitiveType(): Class<String>
Link copied to clipboard
abstract fun retrieve(key: NamespacedKey): T

Gets the value of the keyed type corresponding to T.

Link copied to clipboard
open override fun toPrimitive(complex: T, context: PersistentDataAdapterContext): String