pesde twistedsignal / replication

Server service

The server-only Replication.server.service object manages session state.

waitForData(player)

Waits until the player's state exists, then returns its typed value object.

onPlayerInit(player, data)

Override this method to change a player's raw template copy before its first replication to the client.

reset(player)

Replaces the player's current state with a fresh template copy and sends it to the client. This is an in-memory reset only.

addPlayerRemovingCallback(callback)

Runs a cleanup callback with the player and their raw state before the package discards that state. It returns a function that unregisters the callback.