@Immutable public class BedrockPacketCodec extends Object implements com.nukkitx.network.PacketCodec<BedrockPacket>
| Modifier and Type | Class and Description |
|---|---|
static class |
BedrockPacketCodec.Builder |
| Modifier and Type | Field and Description |
|---|---|
static int |
BROADCAST_PROTOCOL_VERSION |
static BedrockPacketCodec |
DEFAULT |
| Constructor and Description |
|---|
BedrockPacketCodec() |
| Modifier and Type | Method and Description |
|---|---|
static BedrockPacketCodec.Builder |
builder() |
int |
getId(BedrockPacket packet) |
boolean |
isCompatibleVersion(int protocolVersion) |
BedrockPacket |
tryDecode(io.netty.buffer.ByteBuf buf) |
io.netty.buffer.ByteBuf |
tryEncode(BedrockPacket packet) |
public static final int BROADCAST_PROTOCOL_VERSION
public static final BedrockPacketCodec DEFAULT
public boolean isCompatibleVersion(int protocolVersion)
public BedrockPacket tryDecode(io.netty.buffer.ByteBuf buf)
tryDecode in interface com.nukkitx.network.PacketCodec<BedrockPacket>public io.netty.buffer.ByteBuf tryEncode(BedrockPacket packet)
tryEncode in interface com.nukkitx.network.PacketCodec<BedrockPacket>public int getId(BedrockPacket packet)
getId in interface com.nukkitx.network.PacketCodec<BedrockPacket>public static BedrockPacketCodec.Builder builder()
Copyright © 2017–2018 NukkitX. All rights reserved.