The user data of the peer
The instance of the server
Adds an item from the inventory
The id of the item
The amount to add
Whether or not a player is already in cache
The user id to use for filter, if not specified, will use the connectID.
Plays an audio file.
The name of the file
The delay, in ms on when to play.
Returns the packet for clothing
Whether or not to play the sfx when wearing clothes. Defaults to false
Creates a new player to be saved to the database. This will also set the data
property of a peer
The data of the peer to create
Whether or not to save the data to cache as well. Defaults to false
Disconnects a peer
The type of disconnection.
Fetches the peer data from the cache or database
Where to fetch the data
Check if proper player data is present.
Sends the inventory packet
Whether or not a peer is connected
Joins a world
The name of the world
Whether or not the player joining is a super mod. Defaults to false
Makes the current peer leave the current world he is in.
Whether or not to send the peer to the world menu. Defaults to false.
Removes an item from the inventory
The id of the item
The amount to remove
Request the login information from the peer. This will emit the "receive" event.
Saves player data to the cache.
Saves the player to the database.
Sends the packet to the peer
The packet to send
Sends multiple packets to a peer.
The data to send. Not an array but argument parameters.
Sets the status of a player
Whether or not to save to cache
Whether or not to set it as offline or online. Defaults to false
Creates a new world class then returns it.
The name of the world
Whether or not to auto-fetch the world data from either the cache or the database. Defaults to false.
Creates a new world class then returns it
Whehter or not to auto-fetch the world data from either the cache or the database. Defaults to false
Generated using TypeDoc
A class that represents a connected peer