hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
56 lines (27 loc) • 764 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [WorldManager](./server.worldmanager.md) > [getWorld](./server.worldmanager.getworld.md)
## WorldManager.getWorld() method
Gets a world by its id.
**Signature:**
```typescript
getWorld(id: number): World | undefined;
```
## Parameters
<table><thead><tr><th>
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
id
</td><td>
number
</td><td>
The id of the world to get.
</td></tr>
</tbody></table>
**Returns:**
[World](./server.world.md) \| undefined
The world with the provided id, or undefined if no world is found.