Package dev.jorel.commandapi.network
Interface CommandAPIPacketHandlerProvider<InputChannel>
- Type Parameters:
InputChannel- The type of objects that might send a packet to this plugin on this platform.
public interface CommandAPIPacketHandlerProvider<InputChannel>
An interface for defining the platform-level implementations of
CommandAPIPacketHandler. Each method returns a
packet handler for a different CommandAPIProtocol. These methods should be implemented on each platform to
determine the class that handles each packet channel.-
Method Summary
Modifier and TypeMethodDescriptiondefault CommandAPIPacketHandler<InputChannel> getHandlerForProtocol(CommandAPIProtocol protocol) Gets theCommandAPIPacketHandlerfor the givenCommandAPIProtocol.
-
Method Details
-
getHandlerForProtocol
Gets theCommandAPIPacketHandlerfor the givenCommandAPIProtocol.- Parameters:
protocol- The protocol channel- Returns:
- The packet handler
-
getHandshakePacketHandler
HandshakePacketHandler<InputChannel> getHandshakePacketHandler()- Returns:
- The implementation of
HandshakePacketHandlerfor this platform.
-
getPlayPacketHandler
PlayPacketHandler<InputChannel> getPlayPacketHandler()- Returns:
- The implementation of
PlayPacketHandlerfor this platform.
-