Skip to content

function setPlayerVirtualWorld

This function will set the player virtual world for all players.
Virtual worlds are separate logical worlds on the same physical world.
Original: setPlayerVirtualWorld

Declaration

async def setPlayerVirtualWorld(id : int, virtualWorld : int)

Parameters

int id: the player id.
int virtualWorld: the virtual world id in range <0, 65535>.

Source code in src/pyg2o/functions/player.py
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
async def setPlayerVirtualWorld(id : int, virtualWorld : int):
    """
    This function will set the player virtual world for all players.
    Virtual worlds are separate logical worlds on the same physical world.
    Original: [setPlayerVirtualWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/setPlayerVirtualWorld/)

    ## Declaration
    ```python
    async def setPlayerVirtualWorld(id : int, virtualWorld : int)
    ```
    ## Parameters
    `int` **id**: the player id.
    `int` **virtualWorld**: the virtual world id in range <0, 65535>.
    """
    data = f'return {get_call_repr()}'

    server = await PythonWebsocketServer.get_server()
    result = await server.make_request(data)
    return result