set

operator fun <T : Any> set(key: CompoundKey<T>, value: T)(source)

Puts the given value into the persistent storage.

Values have to be serializable. Annotate them with kotlinx.serialization.Serializable to enable support for fast serialization.

An exception to the above are values of the type NbtElement. You can use these to skip serialization and deserialization. It is not as convenient to work with them, but they are faster.