-
Notifications
You must be signed in to change notification settings - Fork 15
Proxy
The Proxy
class. This class extends the Server
class from node-minecraft-protocol.
More information about the Server
class can be found here.
-
An object with the arguments for the
Server
class. The options for this class are explained in the node-minecraft-protocol documentation. -
A serverList object. See
createProxy()
for more info. -
-
autoConnect:
bool
If the proxy should automatically forward player to the default server when they connect -
autoFallback:
bool
If the proxy should move players to the fallback server when they get kicked from another server
-
autoConnect:
-
The server list object that was passed when creating the proxy. This object can be modified.
-
Whether the proxy automatically forwards players to the default server when they connect. Can be modified.
-
Whether the proxy automatically moves players to the fallback server when they lose connection. Can be modified.
-
All the variables inherited from the node-minecraft-protocol
Server
class
-
Move the client with the specified
ClientId
to the server with the specifiednewServerName
Arguments
-
remoteClientId
The id of the client. The client object is inherited from the
Server
class. -
newServerName
The name of the new server to which the client will be connected. This name should be present in the serverList.
-
-
Move the client with the specified
ClientId
to the fallback server (obtained using getFallBackServer())Arguments
-
remoteClientId
The id of the client. The client object is inherited from the
Server
class.
-
-
Returns the
serverName
of the fallback server. -
Returns the
serverName
of the default server. -
All the methods inherited from the node-minecraft-protocol
Server
class
-
Emitted when an error occurs.
Parameters
-
error
: the error object
-
-
Inherited from the
Server
class from node-minecraft-protocol, emitted when a player logs in. IfautoConnect
is set to false, the player should be manually connected here by calling setRemoteServer(). -
Emitted when a player is moving from a server to another (whether the player is being moved normally or is falling back to another server).
Parameters
-
playerId
: the id of the client that is being moved. -
oldServerName
: the id of the server from which the player is being moved. -
newServerName
: the id of the server to which the player is being moved.
-
-
Emitted when a player has been moved from a server to another (whether the player was moved normally or was falling back to another server).
Parameters
-
playerId
: the id of the client that was moved. -
oldServerName
: the id of the server from which the player was moved. -
newServerName
: the id of the server to which the player was moved.
-
-
Emitted when a player has failed to move from a server to another (whether the player was moved normally or was falling back to another server, normally emitted together with the
error
event).Parameters
-
error
: the error that prevented the move of the player. -
playerId
: the id of the client that was being moved. -
oldServerName
: the id of the server from which the player was being moved. -
newServerName
: the id of the server to which the player was being moved.
-
-
Emitted when a player is falling back from a server to another (normally emitted together with the
playerMoving
event).Parameters
-
playerId
: the id of the client that is being moved. -
oldServerName
: the id of the server from which the player is being moved. -
newServerName
: the id of the server to which the player is being moved.
-
-
All the events inherited from the node-minecraft-protocol
Server
class