hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
58 lines (28 loc) • 893 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [WorldManager](./server.worldmanager.md) > [setDefaultWorld](./server.worldmanager.setdefaultworld.md)
## WorldManager.setDefaultWorld() method
Sets the default world players join on connect.
Use for: changing the lobby or main world at runtime. Do NOT use for: moving already connected players; use `Player.joinWorld`<!-- -->.
**Signature:**
```typescript
setDefaultWorld(world: World): void;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
world
</td><td>
[World](./server.world.md)
</td><td>
The world to set as the default.
\*\*Category:\*\* Core
</td></tr>
</tbody></table>
**Returns:**
void