Generic sync listener for arbitrary types that can be cast to/from int. Only works for values representable as an int (class instances, handle ids). The synced object must already be in sync across all clients.
public constant DEFAULT_PREFIX = "S"Declaration shown above.
Configurable. Override it in your map’s config package.
public constant LAST_CHUNK_PREFIX = "T"Declaration shown above.
Configurable. Override it in your map’s config package.
public constant SYNC_IN_REPLAYS = falseDeclaration shown above.
Configurable. Override it in your map’s config package.
public function bool.sync(player p, BoolSyncListener listener)Syncs a bool from the given player.
public function int.sync(player p, IntSyncListener listener)Syncs an int from the given player.
public function real.sync(player p, RealSyncListener listener)Syncs a real from the given player.
public function player.sync<T>(T data, AnySyncListener<T> listener)Syncs an arbitrary type from the given player. Only works for values representable as an int handle/index (class instances, handle ids). The synced object must already be in sync across clients. Listener is destroyed after firing.
public function string.sync(player p, StringSyncListener listener)Syncs a single string from the given player. A null string is synced as the empty string.
public function ChunkedString.sync(player p, BufferSyncListener listener)Syncs a chunked string from the given player. The chunked string is consumed: it is read while syncing and destroyed afterwards, so do not use it again after calling this.