EnumPersistentDataType

A PersistentDataType that can be used with any enum class (such as org.bukkit.Material).

Assumes that the enum names do not change between serialization and deserialization. (For example, if you serialize Sound.EPIC_SOUND and later rename it to Sound.GREAT_SOUND, this will obviously fail to deserialize as Sound.EPIC_SOUND no longer exists).

Constructors

Link copied to clipboard
constructor(enumClass: Class<E>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun fromPrimitive(primitive: String, context: PersistentDataAdapterContext): E
Link copied to clipboard
open override fun getComplexType(): Class<E>
Link copied to clipboard
open override fun getPrimitiveType(): Class<String>
Link copied to clipboard
open override fun toPrimitive(complex: E, context: PersistentDataAdapterContext): String