Static
blocksetStatic
boundsStatic
commandStatic
commandsStatic
defaultStatic
environmentStatic
standardStatic
templateAdds a player to the level.
The player to be added.
Destroys the level, releasing any resources used for it.
Optional
saveChanges: boolean = trueOptional
position: Vector3 = ...Optional
orientation: Vector2 = ...Optional
excludePlayers: BasePlayer[] = []Optional
saveToRecord: boolean = trueStatic
getStatic
loadLoads 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.
Static
sendStatic
teleportTeleports 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.
Optional
spaceName: stringOptional
defaults: {} = {}
Todo
Yet to be documented.