🛏ïļMatchService

Service with information on match state.

Functions

getHost(): Player

Returns the Player that is currently hosting the match.

getPlayerRole(player: Player): MatchRole | nil

Returns the MatchRole of a player if it exists.

getMatchDurationSec(): number

Returns amount of time in seconds since the match started (returns 0 if still in pre-game).

getMatchState(): MatchState

Returns current match state.

endMatch(winningTeam: Team | nil)

Ends the match with a specified winning team (or nil to cause a tie game).

Last updated