register Global Receiver
static boolean registerGlobalReceiver(Identifier channelName, ServerLoginNetworking.LoginQueryResponseHandler channelHandler)
Content copied to clipboard
Registers a handler to a query response channel.A global receiver is registered to all connections, in the present and future.
If a handler is already registered to the {@code channel}
, this method will return {@code false}
, and no change will be made.Use unregisterGlobalReceiver to unregister the existing handler.
Return
false if a handler is already registered to the channel
See also
net.fabricmc.fabric.api.networking.v1.ServerLoginNetworking
ServerLoginNetworking#registerReceiver(ServerLoginNetworkHandler, Identifier, LoginQueryResponseHandler)
Parameters
channelName
the id of the channel
channelHandler
the handler
Sources
jvm source
Link copied to clipboard