-
Notifications
You must be signed in to change notification settings - Fork 16
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
Serverclass. The options for this class are explained in the node-minecraft-protocol documentation. -
A serverList object. See
createProxy()for more info. -
-
autoConnect:
boolIf the proxy should automatically forward player to the default server when they connect -
autoFallback:
boolIf 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
Serverclass
-
Move the client with the specified
ClientIdto the server with the specifiednewServerNameArguments
-
remoteClientId
The id of the client. The client object is inherited from the
Serverclass. -
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
ClientIdto the fallback server (obtained using getFallBackServer())Arguments
-
remoteClientId
The id of the client. The client object is inherited from the
Serverclass.
-
-
Returns the
serverNameof the fallback server. -
Returns the
serverNameof the default server. -
All the methods inherited from the node-minecraft-protocol
Serverclass
-
Emitted when an error occurs.
Parameters
-
error: the error object
-
-
Inherited from the
Serverclass from node-minecraft-protocol, emitted when a player logs in. IfautoConnectis 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
errorevent).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
playerMovingevent).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
Serverclass