fun syncClientData(key: String, value: Any?)Sync a key-value pair to all connected players. A value of null removes the key on the client side.
fun syncClientData(key: String, value: Any?)Sync a key-value pair to all connected players. A value of null removes the key on the client side.
fun syncClientData(player: ServerPlayer, key: String, value: Any?)Sync a key-value pair to a specific player. A value of null removes the key on the client side.
fun syncClientData(entries: Map<String, Any?>)Sync multiple key-value pairs to all connected players. Entries with null values remove the key on the client side.
fun syncClientData(player: ServerPlayer, entries: Map<String, Any?>)Sync multiple key-value pairs to a specific player. Entries with null values remove the key on the client side.
object KattonClientDataClient-side accessor for server-synced data.
operator fun get(key: String): Any?Get the raw value by key. Returns null if key not found.
fun getString(key: String, default: String = ""): StringGet a string value with an optional default.
fun getNumber(key: String, default: Number = 0): NumberGet a numeric value with an optional default.
fun getBool(key: String, default: Boolean = false): BooleanGet a boolean value with an optional default.
fun all(): Map<String, Any?>Returns all synced data entries (read-only snapshot).
val clientData: KattonClientDataShorthand accessor — use clientData["key"] in client scripts.