Package wtf.choco.veinminer.network
Class FabricChannelRegistrar
java.lang.Object
wtf.choco.veinminer.network.FabricChannelRegistrar
- All Implemented Interfaces:
ChannelRegistrar
A Fabric implementation of
ChannelRegistrar
.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
registerClientboundMessageHandler
(@NotNull NamespacedKey channel, @NotNull PluginMessageRegistry<ClientboundPluginMessageListener> registry) Register a message handler for messages being sent from server to client.void
registerServerboundMessageHandler
(@NotNull NamespacedKey channel, @NotNull PluginMessageRegistry<ServerboundPluginMessageListener> registry) Register a message handler for messages being sent from client to server.
-
Constructor Details
-
FabricChannelRegistrar
public FabricChannelRegistrar()
-
-
Method Details
-
registerClientboundMessageHandler
public void registerClientboundMessageHandler(@NotNull @NotNull NamespacedKey channel, @NotNull @NotNull PluginMessageRegistry<ClientboundPluginMessageListener> registry) Description copied from interface:ChannelRegistrar
Register a message handler for messages being sent from server to client.- Specified by:
registerClientboundMessageHandler
in interfaceChannelRegistrar
- Parameters:
channel
- the channel on which to register the handlerregistry
- the client bound plugin message registry
-
registerServerboundMessageHandler
public void registerServerboundMessageHandler(@NotNull @NotNull NamespacedKey channel, @NotNull @NotNull PluginMessageRegistry<ServerboundPluginMessageListener> registry) Description copied from interface:ChannelRegistrar
Register a message handler for messages being sent from client to server.- Specified by:
registerServerboundMessageHandler
in interfaceChannelRegistrar
- Parameters:
channel
- the channel on which to register the handlerregistry
- the server bound plugin message registry
-