playerDisconnect

open suspend override fun playerDisconnect(playerId: String): Boolean(source)

Removes a player with a specific unique identifier from the player list of this instance. This will decrease the active player count and remove the identifier from the Kubernetes resource eventually. The player will then no longer be part of this instance. The return value is guaranteed to match the value set within the SDK, even if the value was not yet synchronized with the Kubernetes resource.

The specific player tracking APIs of the AgonesSdk will eventually be superseded by the arbitrary Counts and Lists that cover a broader use-case and offer similar interfaces for tracking.

Return

Whether this player previously was in the player list of this instance and therefore could be successfully removed from it.

Parameters

playerId

The unique identifier of the player that should be removed from the player list of this instance.

See also

Throws

If null is supplied as the player identifier and therefore no player can be derived from it.