Interface PacketInjector

All Known Implementing Classes:
BoarHandlerAdaptor
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface PacketInjector
Platform hook that replays a Bedrock packet inbound as if the client had just sent it.

Contract: the call consumes one reference to the packet, and the replay must skip Boar's own listener chain (the check that cancelled the packet has already approved it). Other server-side consumers of the inbound stream should still observe the packet, the same way they would when BoarHandlerAdaptor.injectClientPacket(org.cloudburstmc.protocol.bedrock.packet.BedrockPacket) fires it down the netty pipeline past Boar's handler.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    injectClientPacket(org.cloudburstmc.protocol.bedrock.packet.BedrockPacket packet)
     
  • Method Details

    • injectClientPacket

      void injectClientPacket(org.cloudburstmc.protocol.bedrock.packet.BedrockPacket packet)