World of Hello
Static Public Member Functions | List of all members
self Class Reference

used for functions relating to the current user. More...

#include <self.h>

Static Public Member Functions

static void setWorld (string worldName)
 warps the user to a different world. More...
 
static string getWorld ()
 gets the name of the current world. More...
 
static int getId ()
 gets the id of the user. More...
 
static string getAccount ()
 gets the name of the account the user is logged into. More...
 

Detailed Description

used for functions relating to the current user.

Member Function Documentation

◆ getAccount()

static string self::getAccount ( )
static

gets the name of the account the user is logged into.

Returns
The name of the user's logged in account. If they are not logged in, returns an empty string.

◆ getId()

static int self::getId ( )
static

gets the id of the user.

   Unique ids are assigned to users uppon connections. Grabs the unique id for the user.
Returns
The id of the user.

◆ getWorld()

static string self::getWorld ( )
static

gets the name of the current world.

   Typically you will know your own world name, but this is for the case that a world name may be changed.
Returns
The name of the world the user is currently connected to.

◆ setWorld()

static void self::setWorld ( string  worldName)
static

warps the user to a different world.

   Used to switch apps. If the world doesn't exist or the user does not have sufficient access rights,
   they are instead sent to the login world.
Parameters
Thename of the world to be warped to.