AbstractChanneledNetworkAddon

public abstract class AbstractChanneledNetworkAddon<H> extends AbstractNetworkAddon<H> implements PacketSender

A network addon which is aware of the channels the other side may receive.

Parameters

<H>

the channel handler type

Functions

createPacket
Link copied to clipboard
abstract Packet<? extends ObjectcreatePacket(Identifier channelName, PacketByteBuf buf)
Makes a packet for a channel.
getHandler
Link copied to clipboard
@Nullable()
H getHandler(Identifier channel)
getReceivableChannels
Link copied to clipboard
Set<IdentifiergetReceivableChannels()
getSendableChannels
Link copied to clipboard
Set<IdentifiergetSendableChannels()
handleDisconnect
Link copied to clipboard
final void handleDisconnect()
lateInit
Link copied to clipboard
abstract void lateInit()
registerChannel
Link copied to clipboard
boolean registerChannel(Identifier channelName, H handler)
sendPacket
Link copied to clipboard
void sendPacket(Packet<? extends Object> packet)
Sends a packet.
abstract void sendPacket(Packet<? extends Object> packet, @Nullable() GenericFutureListener<? extends Future<? extends Object>> callback)
Sends a packet.
void sendPacket(Identifier channel, PacketByteBuf buf)
Sends a packet to a channel.
void sendPacket(Packet<? extends Object> packet, GenericFutureListener<? extends Future<? extends Object>> callback)
Sends a packet.
void sendPacket(Identifier channel, PacketByteBuf buf, @Nullable() GenericFutureListener<? extends Future<? extends Object>> callback)
Sends a packet to a channel.
unregisterChannel
Link copied to clipboard
H unregisterChannel(Identifier channelName)

Properties

sendableChannels
Link copied to clipboard
protected final Set<IdentifiersendableChannels

Inheritors

ClientPlayNetworkAddon
Link copied to clipboard
ServerPlayNetworkAddon
Link copied to clipboard

Sources

jvm source
Link copied to clipboard