Class StateChangeDetector

java.lang.Object
org.geysermc.floodgate.core.addon.debug.StateChangeDetector

public class StateChangeDetector extends Object
  • Constructor Details

    • StateChangeDetector

      public StateChangeDetector(io.netty.channel.Channel channel, String packetEncoderName, String packetDecoderName, org.geysermc.floodgate.api.logger.FloodgateLogger logger)
  • Method Details

    • checkPacket

      public void checkPacket(io.netty.buffer.ByteBuf packet, boolean fromClient)
      Checks (and acts) if the current packet is one of the packets that we need to switch states.
      Parameters:
      packet - the packet to check
      fromClient - if the packet is clientbound or serverbound
    • shouldPrintPacket

      public boolean shouldPrintPacket(io.netty.buffer.ByteBuf packet, boolean clientbound)
    • shouldPrintPlayPacket

      public boolean shouldPrintPlayPacket(io.netty.buffer.ByteBuf packet, boolean clientbound)
    • getCurrentState

      public State getCurrentState()