Skip to content

Synced

annotation class Synced(
val key: String,
val doc: String = "",
val external: Boolean = false,
val type: String = "",
val max: Long = -1,
val capacity: Int = -1,
val clientSetting: String = ""
)
Example
class Thirst : Component() {
@Synced("game:thirst", doc = "How thirsty the player is.", max = 100)
var level: Int = 0
}
on_login { player -> player.replaceComponent(Thirst()) }
val key: String
val doc: String
val external: Boolean
val type: String
val max: Long
val capacity: Int
val clientSetting: String