public interface PacketMapping
Packet mapping over packet types or ids containing a packet transformer.
  • Method Details

    • applyType

      void applyType(PacketWrapper wrapper)
      Applies the changed packet type or id to the given packet wrapper.
      wrapper - packet wrapper
    • handler

      @Nullable PacketHandler handler()
      Returns a packet transformer to transform a packet from one protocol version to another.
      packet transformer, or null if no action has to be taken
    • appendHandler

      void appendHandler(PacketHandler handler)
      Appends a packet transformer to the current packet transformer.
      handler - packet transformer
    • of

      static PacketMapping of(int mappedPacketId, @Nullable PacketHandler handler)
    • of

      static PacketMapping of(@Nullable PacketType mappedPacketType, @Nullable PacketHandler handler)