RecordCollection
class RecordCollection<T : Any>import rift.ecs.Persistimport rift.ecs.Persistent
@Persistent class Visits(@Persist val count: Int = 0)
on_login { player -> val visits = Game.worldRecords.collection<Visits>() val key = player.uuid.toString() visits.put(key, Visits((visits.get(key)?.count ?: 0) + 1))}fun get(key: String): T?contains
Section titled “contains”fun contains(key: String): Booleanfun keys(): List<String>fun put( key: String, value: T)delete
Section titled “delete”fun delete(key: String): BooleanreadAll
Section titled “readAll”fun readAll(): RecordsRead<T>