C# Class Pdelvo.Minecraft.Proxy.Library.Plugins.PluginBase

A base class each proxy server plugin must inherit from
Afficher le fichier Open project: pdelvo/Pdelvo.Minecraft.Proxy

Méthodes publiques

Méthode Description
AllowJoining ( CheckIPEventArgs args ) : void

This method is being called at the beginning when a new client connects to the proxy server. A plugin can decide to allow, or deny the incoming connection.

GetServerVersion ( PluginResultEventArgs args ) : void

IN this method plugins can specify the protocol version of the server the proxy should connect to

IsOnlineModeEnabled ( PluginResultEventArgs args ) : void

In this method a plugin can specify if the server should respond to be in online-mode or offline-mode. This can be used to allow administrators to join if minecraft.net is down

Load ( PluginManager manager ) : void

This message is being called once after instantiating the plugin. It is used to initialize the plugin, register packet listeners, or storing references to the plugin manager, or other relevant parts of the proxy server

OnConnectionLost ( UserEventArgs args ) : void

This method is called when the connection to a user is terminated because of the client disconnected, or a network problem appeared

OnPlayerConnected ( UserEventArgs args ) : void

This method is called after the proxy verified, that the incoming connection is a user who wants to join the server and the proxy server verified that it knows the protocol version the client wants to connect with

OnPlayerServerSelection ( PluginResultEventArgs args ) : void

This method is called when the proxy server needs to know to which backend server it should connect to. A plugin can change it, specify the minecraft version, or cancel it to kick the user.

OnUserAccountCheckAsync ( CheckAccountEventArgs args ) : System.Threading.Tasks.Task

In this method a plugin can specify, if a user account is allowed to join with this specific server hash. if no plugin specify it the proxy server will contact minecraft.net to check user accounts.

OnUserConnectedCompleted ( UserEventArgs args ) : void

This event is called after a user successfully joined, and after connecting to the backend server

Method Details

AllowJoining() public méthode

This method is being called at the beginning when a new client connects to the proxy server. A plugin can decide to allow, or deny the incoming connection.
public AllowJoining ( CheckIPEventArgs args ) : void
args Pdelvo.Minecraft.Proxy.Library.Plugins.Events.CheckIPEventArgs The IP address of the remote client
Résultat void

GetServerVersion() public méthode

IN this method plugins can specify the protocol version of the server the proxy should connect to
public GetServerVersion ( PluginResultEventArgs args ) : void
args PluginResultEventArgs Gives information about server and client
Résultat void

IsOnlineModeEnabled() public méthode

In this method a plugin can specify if the server should respond to be in online-mode or offline-mode. This can be used to allow administrators to join if minecraft.net is down
public IsOnlineModeEnabled ( PluginResultEventArgs args ) : void
args PluginResultEventArgs The argument contains information about the user and the result of this call. true means authentification enabled, false means authentification disabled. if the result is null the option in the server configuration file is used
Résultat void

Load() public abstract méthode

This message is being called once after instantiating the plugin. It is used to initialize the plugin, register packet listeners, or storing references to the plugin manager, or other relevant parts of the proxy server
public abstract Load ( PluginManager manager ) : void
manager PluginManager The plugin manager which loaded the plugin
Résultat void

OnConnectionLost() public méthode

This method is called when the connection to a user is terminated because of the client disconnected, or a network problem appeared
public OnConnectionLost ( UserEventArgs args ) : void
args Pdelvo.Minecraft.Proxy.Library.Plugins.Events.UserEventArgs The arguments give information about the user, who disconnected from the server
Résultat void

OnPlayerConnected() public méthode

This method is called after the proxy verified, that the incoming connection is a user who wants to join the server and the proxy server verified that it knows the protocol version the client wants to connect with
public OnPlayerConnected ( UserEventArgs args ) : void
args Pdelvo.Minecraft.Proxy.Library.Plugins.Events.UserEventArgs A UserEventArgs which give access to relevant operations like reading user information, or methods to cancel the request
Résultat void

OnPlayerServerSelection() public méthode

This method is called when the proxy server needs to know to which backend server it should connect to. A plugin can change it, specify the minecraft version, or cancel it to kick the user.
public OnPlayerServerSelection ( PluginResultEventArgs args ) : void
args PluginResultEventArgs A UserEventArgs which give access to relevant operations like reading user information, and the current server which is a connect candidate, or methods to cancel the request
Résultat void

OnUserAccountCheckAsync() public méthode

In this method a plugin can specify, if a user account is allowed to join with this specific server hash. if no plugin specify it the proxy server will contact minecraft.net to check user accounts.
public OnUserAccountCheckAsync ( CheckAccountEventArgs args ) : System.Threading.Tasks.Task
args CheckAccountEventArgs Contains the user connection object and the user hash. A plugin can kick users by setting the call canceled
Résultat System.Threading.Tasks.Task

OnUserConnectedCompleted() public méthode

This event is called after a user successfully joined, and after connecting to the backend server
public OnUserConnectedCompleted ( UserEventArgs args ) : void
args Pdelvo.Minecraft.Proxy.Library.Plugins.Events.UserEventArgs Information about the connected user
Résultat void