public interface PacketMapping
Modifier and Type | Method and Description |
---|---|
void |
applyType(PacketWrapper wrapper)
Applies the changed packet type or id to the given packet wrapper.
|
@Nullable PacketHandler |
handler()
Returns a packet transformer to transform a packet from one protocol version to another.
|
static PacketMapping |
of(int mappedPacketId,
@Nullable PacketHandler handler) |
static PacketMapping |
of(@Nullable PacketType mappedPacketType,
@Nullable PacketHandler handler) |
void applyType(PacketWrapper wrapper)
wrapper
- packet wrapper@Nullable PacketHandler handler()
static PacketMapping of(int mappedPacketId, @Nullable PacketHandler handler)
static PacketMapping of(@Nullable PacketType mappedPacketType, @Nullable PacketHandler handler)