Interface ServerConfigurationNetworking.ConfigurationPacketHandler<T extends FabricPacket>
- Type Parameters:
T
- the type of the packet
- Enclosing class:
ServerConfigurationNetworking
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface ServerConfigurationNetworking.ConfigurationPacketHandler<T extends FabricPacket>
A thread-safe packet handler utilizing
FabricPacket
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
receive
(T packet, PacketSender responseSender) Handles the incoming packet.
-
Method Details
-
receive
Handles the incoming packet. This is called on the server thread.An example usage of this:
// See FabricPacket for creating the packet ServerConfigurationNetworking.registerReceiver(BOOM_PACKET_TYPE, (packet, responseSender) -> { });
- Parameters:
packet
- the packetresponseSender
- the packet sender- See Also:
-