public class StateChangeDetector extends Object
| Constructor and Description |
|---|
StateChangeDetector(io.netty.channel.Channel channel,
String packetEncoderName,
String packetDecoderName,
org.geysermc.floodgate.api.logger.FloodgateLogger logger) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
State |
getCurrentState() |
boolean |
shouldPrintPacket(io.netty.buffer.ByteBuf packet,
boolean clientbound) |
boolean |
shouldPrintPlayPacket(io.netty.buffer.ByteBuf packet,
boolean clientbound) |
public void checkPacket(io.netty.buffer.ByteBuf packet,
boolean fromClient)
packet - the packet to checkfromClient - if the packet is clientbound or serverboundpublic boolean shouldPrintPacket(io.netty.buffer.ByteBuf packet,
boolean clientbound)
public boolean shouldPrintPlayPacket(io.netty.buffer.ByteBuf packet,
boolean clientbound)
public State getCurrentState()