game-common / pragma.matchlifecycle / MatchFoundPlugin /

MatchFoundPlugin #

interface MatchFoundPlugin

MatchFoundPlugin is used to define custom interactions when players are starting or joining a match.

Functions #

NameSummary

buildExtConnectionDetails

abstract suspend fun buildExtConnectionDetails(matchDetails: ExtMatchDetails, playerMatchDetails: ExtPlayerMatchDetails): ExtMatchConnectionDetailsNotification

Called when preparing the match connection details for a player joining a match. Use to create a customized ExtMatchConnectionDetailsNotification for the player that will be sent to them in a MatchLifecycleRpc.MatchReadyV1Notification.

prepareMatch

open suspend fun prepareMatch(extCreateMatchRequest: ExtCreateMatchV1Request, extMatchmakingKey: ExtMatchmakingKey, gameServerVersion: GameServerVersion, gameServerZone: GameServerZone, players: List<MatchLifecycleCommon.MatchmakingPlayerInfo>, parties: List<PartyRpcCommon.Party>): ExtCreateMatchV1Request

Called before requesting a game server to run a new match. Use to customize the ext data to be sent to the game server after it starts up.

prepareMatchInfo

open suspend fun prepareMatchInfo(createMatchRequest: MatchLifecycleRpc.CreateMatchV2Request, startMatchRequest: MatchCapacityRpc.StartMatchV1Request.Builder): MatchCapacityRpc.StartMatchV1Request

Called before requesting a game server to run a new match. Use to customize the ext data to be sent to the game server after it starts up. Set any desired ext data or perform any other customization on the StartMatchV1Request.

preparePlayers

open suspend fun preparePlayers(extCreateMatchRequest: ExtCreateMatchV1Request, extMatchmakingKey: ExtMatchmakingKey, gameServerVersion: GameServerVersion, gameServerZone: GameServerZone, players: List<MatchLifecycleCommon.MatchmakingPlayerInfo>, parties: List<PartyRpcCommon.Party>): Map<MatchLifecycleCommon.MatchmakingPlayerInfo, ExtPlayerInfo>

Called before notifying a game server that players are about to join the match. Use to customize the ext data per player to be sent to the game server.