Skip to content

function getPlayerVirtualWorld

This function will get the player virtual world.
Original: getPlayerVirtualWorld

Declaration

async def getPlayerVirtualWorld(id : int) -> int

Parameters

int id: the player id.

Returns

int: the player virtual world id.

Source code in src/pyg2o/functions/player.py
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
async def getPlayerVirtualWorld(id : int) -> int:
    """
    This function will get the player virtual world.
    Original: [getPlayerVirtualWorld](https://gothicmultiplayerteam.gitlab.io/docs/0.3.0/script-reference/server-functions/player/getPlayerVirtualWorld/)

    ## Declaration
    ```python
    async def getPlayerVirtualWorld(id : int) -> int
    ```
    ## Parameters
    `int` **id**: the player id.
    ## Returns
    `int`: the player virtual world id.
    """
    data = f'return {get_call_repr()}'

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