Config

data class Config(val activity: GameActivity, val world: ServerLevel, val lobbySpawn: Vec3, val teamList: GameTeamList? = null, val onPlayerAdd: (ServerPlayer) -> Unit? = null, val onStart: (GameSpace, TeamSelectionLobby?) -> Unit)(source)

Lobby configuration bundled into a single object to satisfy detekt's LongParameterList rule.

Constructors

Link copied to clipboard
constructor(activity: GameActivity, world: ServerLevel, lobbySpawn: Vec3, teamList: GameTeamList? = null, onPlayerAdd: (ServerPlayer) -> Unit? = null, onStart: (GameSpace, TeamSelectionLobby?) -> Unit)

Properties

Link copied to clipboard
val activity: GameActivity

the Plasmid game activity to attach the lobby to

Link copied to clipboard
val lobbySpawn: Vec3

position to teleport players to during the lobby phase

Link copied to clipboard
val onPlayerAdd: (ServerPlayer) -> Unit?

optional callback invoked when a player is added to the game space

Link copied to clipboard
val onStart: (GameSpace, TeamSelectionLobby?) -> Unit

callback invoked when the start item is used; the game should swap to its active activity via gameSpace.setActivity { ... } inside this callback

Link copied to clipboard
val teamList: GameTeamList?

optional team list for team-based games (enables team picker hotbar UI)

Link copied to clipboard
val world: ServerLevel

the game world (used for teleporting players)