game-common / pragma.party / PartyPlugin / canChangeReady /

canChangeReady #

open suspend fun canChangeReady(player: Party.PartyPlayer, newReadyState: Boolean, party: Party.Party, partyConfig: PartyConfig): Boolean

Called when receiving a change ready state request. Use to determine whether a player can change their ready state. Return true to allow Pragma to change their ready state to the new ready state, or return false to block the change.

Used by:

  • PartyService.setReadyStateV1

Parameters #

player

The player changing their ready state.

newReadyState

The new ready state the player wants to set.

party

The player’s current party

partyConfig

The current service-level PartyConfig.