Interface ServerConfigurationNetworking.ConfigurationPacketHandler<T extends CustomPayload>
- 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 CustomPayload>
A packet handler utilizing
CustomPayload
.-
Method Summary
Modifier and TypeMethodDescriptionvoid
receive
(T payload, ServerConfigurationNetworking.Context context) Handles an incoming packet.
-
Method Details
-
receive
Handles an incoming packet.Unlike
ServerPlayNetworking.PlayPayloadHandler
this method is executed on netty's event loops. Modification to the game should be scheduled using the Minecraft server instance fromServerConfigurationNetworking.getServer(ServerConfigurationNetworkHandler)
.An example usage of this:
// See FabricPacket for creating the packet ServerConfigurationNetworking.registerReceiver(BOOM_PACKET_TYPE, (packet, responseSender) -> { });
- Parameters:
payload
- the packet payloadcontext
- the configuration networking context- See Also:
-