Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

sendMatchJoin

sendMatchJoin(world, target): Promise<SettledCommandResult<CommandHandle<{ match: EntityCommandField & object; queue: ListCommandField<OneOfCommandField<string>>; }, "closed" | "game-rule" | "already-in-match" | "no-match" | "party-too-large" | "not-party-leader" | "party-member-busy" | "queue-full", { isQueued: BooleanCommandField; position: NumberCommandField; }, false, false, "join", false, false>>>

Asks the room to put this page’s player, with the player’s party where the player leads one, in the line target names: a shared queue, or a match’s. Resolves with whether the player waits and the player’s place, or a MatchJoinRefusal.

Parameter Type
world World
target MatchJoinTarget

Promise<SettledCommandResult<CommandHandle<{ match: EntityCommandField & object; queue: ListCommandField<OneOfCommandField<string>>; }, "closed" | "game-rule" | "already-in-match" | "no-match" | "party-too-large" | "not-party-leader" | "party-member-busy" | "queue-full", { isQueued: BooleanCommandField; position: NumberCommandField; }, false, false, "join", false, false>>>