hytopia
Version:
The HYTOPIA SDK makes it easy for developers to create massively multiplayer games using JavaScript or TypeScript.
58 lines (28 loc) • 818 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [server](./server.md) > [Player](./server.player.md) > [joinWorld](./server.player.joinworld.md)
## Player.joinWorld() method
Joins a player to a world.
**Signature:**
```typescript
joinWorld(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 join the player to.
</td></tr>
</tbody></table>
**Returns:**
void
## Remarks
If the player is already in a [World](./server.world.md)<!-- -->, they will be removed from their current world before joining the new world.