Interface PacketHandler<C>


public interface PacketHandler<C>
For advanced users only! You shouldn't play with this unless you know what you're doing.
  • Method Summary

    Modifier and Type
    Method
    Description
    handle(C ctx, Object packet, boolean serverbound)
    Called when a registered packet has been seen.
  • Method Details

    • handle

      Object handle(C ctx, Object packet, boolean serverbound)
      Called when a registered packet has been seen.
      Parameters:
      ctx - the channel handler context of the connection
      packet - the packet instance
      serverbound - if the packet is serverbound
      Returns:
      the packet it should forward. Can be null or a different packet / instance