Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src.forge;
- import net.minecraft.src.NetworkManager;
- import net.minecraft.src.Packet1Login;
- public interface IConnectionHandler
- {
- /**
- * Raised when a Client successfully connects it's socket to the Server.
- * @param network The new NetworkManager associated with this connection.
- */
- public void OnConnect(NetworkManager network);
- /**
- * Raised when you receive a Packet1Login.
- * On the server, it is raised after the NetHandler is switched, and the
- * initial user placement/info packets are sent.
- *
- * On the client, this is raised after the packet is parsed, and the user
- * is sitting at the 'Downloading Terrain' screen.
- *
- * @param network The NetoworkManager associated with this connection.
- * @param login The login packet
- */
- public void OnLogin(NetworkManager network, Packet1Login login);
- /**
- * Raised whenever the socket is closed, can be caused by various reasons.
- *
- * @param network The NetworkManager associated with this connection.
- * @param message The translated message to be displayed for this disconnection.
- * @param args Any additional arguments that the code may of provided.
- * Sometimes this is further explanation, or a Throwable, in the case of errors.
- */
- public void OnDisconnect(NetworkManager network, String message, Object[] args);
- }
Advertisement
Add Comment
Please, Sign In to add comment