StaticblocksetStaticboundsStaticcommandStaticcommandsStaticdefaultStaticenvironmentStaticstandardStatictemplateAdds a player to the level.
The player to be added.
Destroys the level, releasing any resources used for it.
OptionalsaveChanges: boolean = trueOptionalposition: Vector3 = ...Optionalorientation: Vector2 = ...OptionalexcludePlayers: BasePlayer[] = []OptionalsaveToRecord: boolean = trueStaticgetStaticloadLoads a level into a universe instance, creating it if it doesn't exist.
The universe to load the level into.
The identifier of the level.
The default properties for the level.
A promise that resolves to the loaded level.
StaticsendStaticteleportTeleports the player into the level. If level currently doesn't exist in universe, it'll be created. Levels extending Level are expected to override this method using this pattern:
static async teleportPlayer(player, spaceName) {
if (super.teleportPlayer(player) === false) return // Removes player from any levels they are in. If it returns false, the player is still being teleported somewhere.
Level.loadIntoUniverse(player.universe, spaceName, { // Create the level using its desired defaults.
levelClass: HubLevel,
}).then(async (level) => { // Add player after it loads.
level.addPlayer(player, [60, 8, 4], [162, 254])
})
}
The player to teleport.
OptionalspaceName: stringOptionaldefaults: {} = {}
Todo
Yet to be documented.