2
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
782 B
Java

package net.minecraft.network;
import net.minecraft.util.IChatComponent;
public interface INetHandler
{
/**
* Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination
*/
void onDisconnect(IChatComponent reason);
/**
* Allows validation of the connection state transition. Parameters: from, to (connection state). Typically throws
* IllegalStateException or UnsupportedOperationException if validation fails
*/
void onConnectionStateTransition(EnumConnectionState oldState, EnumConnectionState newState);
/**
* For scheduled network tasks. Used in NetHandlerPlayServer to send keep-alive packets and in NetHandlerLoginServer
* for a login-timeout
*/
void onNetworkTick();
}