server.configure
Changes server options for this gamemode. Call it once, when the gamemode starts.
Signature
Section titled “Signature”server.configure(options: { spawnTimeout?: "allow" | "hold"; dispatchMode?: "session" | "global" }): voidParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
options.spawnTimeout |
"allow" | "hold" |
What happens when a playerSpawnRequest isn’t answered within 5 seconds: allow (the default) spawns the player at the server’s spawn point, hold keeps them held until you call players.spawn. |
options.dispatchMode |
"session" | "global" |
Only while the gamemode loads. session (the default): each player’s events and commands run in order, and one player’s slow handler does not hold up the others. global: every handler waits for the one before, as before 0.22; for gamemodes written that way. See async handlers. |
Changing dispatch mode after readiness throws dispatch-mode-after-ready. See Async handlers.
Returns
Section titled “Returns”Nothing.
Example
Section titled “Example”A mode where nobody spawns without a choice.
import { server } from "nativemp";
server.configure({ spawnTimeout: "hold" });Related
Section titled “Related”playerSpawnRequest: the decision it applies toplayers.spawn: release a held player