Interface BasicPacketChannel
- All Superinterfaces:
Channel
,PacketRegistry
,TransactionalPacketRegistry
Represents a basic channel binding that sends and receives packets. Each
packet type is assigned to an opcode. This channel is compatible with the
forge opcode based packet channels, unlike
PacketChannel
.
There are a few limitations with using this channel. Request/response
packets may only be used during the handshake phase using handshake()
.
Packets can't be send during the configuration phase.
Normal packets may only be send during the play phase.
-
Method Summary
Modifier and TypeMethodDescriptionGets the packet dispatcher which can be used during the handshake phase.play()
Gets the packet dispatcher which can be used during the play phase.Methods inherited from interface org.spongepowered.api.network.channel.Channel
key, manager, setExceptionHandler
Methods inherited from interface org.spongepowered.api.network.channel.packet.PacketRegistry
binding, binding, bindings, register
Methods inherited from interface org.spongepowered.api.network.channel.packet.TransactionalPacketRegistry
registerTransactional, registerTransactional, transactionalBinding
-
Method Details
-
handshake
BasicHandshakePacketDispatcher handshake()Gets the packet dispatcher which can be used during the handshake phase.- Returns:
- The handshake packet dispatcher
-
play
PacketDispatcher play()Gets the packet dispatcher which can be used during the play phase.- Returns:
- The play packet dispatcher
-