CustomBlockData

class CustomBlockData(block: Block, plugin: Plugin) : PersistentDataContainer(source)

Represents a PersistentDataContainer for a specific Block. Also includes some general utility methods that can be applied to every PersistentDataContainer.

Constructors

Link copied to clipboard
constructor(block: Block, plugin: Plugin)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun clear()
Link copied to clipboard
fun copyTo(block: Block, plugin: Plugin)
open override fun copyTo(pdc: PersistentDataContainer, replace: Boolean)
Link copied to clipboard
open operator override fun <T, Z> get(key: NamespacedKey, type: PersistentDataType<T, Z>): Z?
Link copied to clipboard
open override fun getAdapterContext(): PersistentDataAdapterContext
Link copied to clipboard
fun getBlock(): Block?
Link copied to clipboard
fun getDataType(key: NamespacedKey): PersistentDataType<*, *>?
Link copied to clipboard
open override fun getKeys(): Set<NamespacedKey?>
Link copied to clipboard
open override fun <T, C> getOrDefault(key: NamespacedKey, type: PersistentDataType<T & Any, C & Any>, defaultValue: C & Any): C & Any
Link copied to clipboard
open override fun has(key: NamespacedKey): Boolean
open override fun <T, Z> has(key: NamespacedKey, type: PersistentDataType<T, Z>): Boolean
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open override fun readFromBytes(bytes: ByteArray, clear: Boolean)
open fun readFromBytes(p0: @NotNull ByteArray)
Link copied to clipboard
open override fun remove(key: NamespacedKey)
Link copied to clipboard
open override fun serializeToBytes(): ByteArray
Link copied to clipboard
open operator override fun <T, Z> set(key: NamespacedKey, type: PersistentDataType<T, Z>, value: Z & Any)