Types

Link copied to clipboard
@Serializable
data class PlayerErrorsRaised(val playerId: PlayerId, val errors: List<PlayerError>) : MediaEvent

Send a list of any errors that need to be delivered.

Link copied to clipboard
@Serializable
data class PlayerEventsAdded(val playerId: PlayerId, val events: List<PlayerEvent>) : MediaEvent

Send events as a list, allowing them to be batched on the browser for less congestion. If batched, events must ALWAYS be in chronological order.

Link copied to clipboard
@Serializable
data class PlayerMessagesLogged(val playerId: PlayerId, val messages: List<PlayerMessage>) : MediaEvent

Send a list of any messages that need to be delivered.

Link copied to clipboard
@Serializable
data class PlayerPropertiesChanged(val playerId: PlayerId, val properties: List<PlayerProperty>) : MediaEvent

This can be called multiple times, and can be used to set / override / remove player properties. A null propValue indicates removal.

Link copied to clipboard
@Serializable
data class PlayersCreated(val players: List<PlayerId>) : MediaEvent

Called whenever a player is created, or when a new agent joins and receives a list of active players. If an agent is restored, it will receive the full list of player ids and all events again.