Interface PayloadConnection<BASE extends CustomPacketPayload>
- All Known Subinterfaces:
PayloadChannel.Builder.ProtocolFactory<BUF,
,BASE> PayloadFlow<BUF,
,BASE> PayloadHandlerFlow<BUF,
,BASE> PayloadHandlerProtocol<BUF,
,BASE> PayloadProtocol<BUF,
BASE>
- All Known Implementing Classes:
PayloadChannel.Builder
,PayloadChannel.Builder.Flow
,PayloadChannel.Builder.HandlerFlow
,PayloadChannel.Builder.HandlerProtocol
,PayloadChannel.Builder.Protocol
public interface PayloadConnection<BASE extends CustomPacketPayload>
-
Method Summary
Modifier and TypeMethodDescriptiondefault PayloadProtocol
<FriendlyByteBuf, BASE> any()
Creates a builder grouping together packets that are valid under any protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE> any
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are valid under any protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadConnection<BASE> any
(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofany(AttributeKey)
.default PayloadConnection
<BASE> any
(Consumer<PayloadProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version ofany()
.default PayloadProtocol
<FriendlyByteBuf, BASE> Creates a builder grouping together packets that are only valid when under the Configuration protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE> configuration
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Configuration protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadConnection<BASE> configuration
(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofconfiguration(AttributeKey)
.default PayloadConnection
<BASE> configuration
(Consumer<PayloadProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version ofconfiguration()
.default PayloadProtocol
<FriendlyByteBuf, BASE> login()
Creates a builder grouping together packets that are only valid when under the Login protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE> login
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadConnection<BASE> login
(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version oflogin(AttributeKey)
.default PayloadConnection
<BASE> login
(Consumer<PayloadProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version oflogin()
.default PayloadProtocol
<RegistryFriendlyByteBuf, BASE> play()
Creates a builder grouping together packets that are only valid when under the Play protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadHandlerProtocol<RegistryFriendlyByteBuf, NEWBASE> play
(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol.default <CTX,
NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadConnection<BASE> play
(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<RegistryFriendlyByteBuf, NEWBASE>> consumer) Consumer version ofplay(AttributeKey)
.default PayloadConnection
<BASE> play
(Consumer<PayloadProtocol<RegistryFriendlyByteBuf, BASE>> consumer) Consumer version ofplay()
.default <BUF extends FriendlyByteBuf,
CTX, NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadConnection<BASE> protocol
(io.netty.util.AttributeKey<CTX> context, @Nullable NetworkProtocol<BUF> protocol, Consumer<PayloadHandlerProtocol<BUF, NEWBASE>> consumer) Consumer version ofprotocol(AttributeKey,NetworkProtocol)
.<NEWBUF extends FriendlyByteBuf,
CTX, NEWBASE extends SimplePacket<CTX> & CustomPacketPayload>
PayloadHandlerProtocol<NEWBUF, NEWBASE> protocol
(io.netty.util.AttributeKey<CTX> context, @Nullable NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.default <BUF extends FriendlyByteBuf>
PayloadConnection<BASE> protocol
(@Nullable NetworkProtocol<BUF> protocol, Consumer<PayloadProtocol<BUF, BASE>> consumer) Consumer version ofprotocol(NetworkProtocol)
.<NEWBUF extends FriendlyByteBuf,
NEWBASE extends CustomPacketPayload>
PayloadProtocol<NEWBUF, NEWBASE> protocol
(@Nullable NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol.
-
Method Details
-
protocol
<NEWBUF extends FriendlyByteBuf,NEWBASE extends CustomPacketPayload> PayloadProtocol<NEWBUF,NEWBASE> protocol(@Nullable @Nullable NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received. -
protocol
<NEWBUF extends FriendlyByteBuf,CTX, PayloadHandlerProtocol<NEWBUF,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> NEWBASE> protocol(io.netty.util.AttributeKey<CTX> context, @Nullable @Nullable NetworkProtocol<NEWBUF> protocol) Creates a builder grouping together all packets under the same protocol. This will validate that the protocol matches before the packet is sent or received. -
protocol
default <BUF extends FriendlyByteBuf> PayloadConnection<BASE> protocol(@Nullable @Nullable NetworkProtocol<BUF> protocol, Consumer<PayloadProtocol<BUF, BASE>> consumer) Consumer version ofprotocol(NetworkProtocol)
. The Consumer will immediately be called with the created protocol. -
protocol
default <BUF extends FriendlyByteBuf,CTX, PayloadConnection<BASE> protocolNEWBASE extends SimplePacket<CTX> & CustomPacketPayload> (io.netty.util.AttributeKey<CTX> context, @Nullable @Nullable NetworkProtocol<BUF> protocol, Consumer<PayloadHandlerProtocol<BUF, NEWBASE>> consumer) Consumer version ofprotocol(AttributeKey,NetworkProtocol)
. The Consumer will immediately be called with the created protocol. -
configuration
Creates a builder grouping together packets that are only valid when under the Configuration protocol. This will validate that the protocol matches before the packet is sent or received. -
configuration
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadHandlerProtocol<FriendlyByteBuf,NEWBASE> configuration(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Configuration protocol. This will validate that the protocol matches before the packet is sent or received. -
configuration
default PayloadConnection<BASE> configuration(Consumer<PayloadProtocol<FriendlyByteBuf, BASE>> consumer) Consumer version ofconfiguration()
. The Consumer will immediately be called with the created protocol. -
configuration
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadConnection<BASE> configuration(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofconfiguration(AttributeKey)
. The Consumer will immediately be called with the created protocol. -
login
Creates a builder grouping together packets that are only valid when under the Login protocol. This will validate that the protocol matches before the packet is sent or received. -
login
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadHandlerProtocol<FriendlyByteBuf,NEWBASE> login(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol. This will validate that the protocol matches before the packet is sent or received. -
login
Consumer version oflogin()
. The Consumer will immediately be called with the created protocol. -
login
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadConnection<BASE> login(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version oflogin(AttributeKey)
. The Consumer will immediately be called with the created protocol. -
play
Creates a builder grouping together packets that are only valid when under the Play protocol. This will validate that the protocol matches before the packet is sent or received. -
play
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadHandlerProtocol<RegistryFriendlyByteBuf,NEWBASE> play(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are only valid when under the Login protocol. This will validate that the protocol matches before the packet is sent or received. -
play
default PayloadConnection<BASE> play(Consumer<PayloadProtocol<RegistryFriendlyByteBuf, BASE>> consumer) Consumer version ofplay()
. The Consumer will immediately be called with the created protocol. -
play
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadConnection<BASE> play(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<RegistryFriendlyByteBuf, NEWBASE>> consumer) Consumer version ofplay(AttributeKey)
. The Consumer will immediately be called with the created protocol. -
any
Creates a builder grouping together packets that are valid under any protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation. -
any
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadHandlerProtocol<FriendlyByteBuf,NEWBASE> any(io.netty.util.AttributeKey<CTX> context) Creates a builder grouping together packets that are valid under any protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation. -
any
Consumer version ofany()
. The Consumer will immediately be called with the created protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation. -
any
default <CTX,NEWBASE extends SimplePacket<CTX> & CustomPacketPayload> PayloadConnection<BASE> any(io.netty.util.AttributeKey<CTX> context, Consumer<PayloadHandlerProtocol<FriendlyByteBuf, NEWBASE>> consumer) Consumer version ofany(AttributeKey)
. The Consumer will immediately be called with the created protocol. It is not recommended to do this, instead you should use one of the other methods in this class to make sure your packets have basic validation.
-