Interface IPacketHandler
- All Known Implementing Classes:
NetworkRegistry.ClientPacketHandler
,NetworkRegistry.ServerPacketHandler
public interface IPacketHandler
Describes a handler for a packet.
Allows for the handling of full packets from custom payloads
-
Method Summary
Modifier and TypeMethodDescriptionvoid
disconnect
(Component reason) Trigger a disconnect from the network.void
handle
(CustomPacketPayload payload) Invoked to handle the given custom payload.void
Invoked to handle the given packet.
-
Method Details
-
handle
Invoked to handle the given packet.- Parameters:
packet
- The packet.
-
handle
Invoked to handle the given custom payload.- Parameters:
payload
- The payload.
-
disconnect
Trigger a disconnect from the network.- Parameters:
reason
- The reason for the disconnect.
-