Class StateChangeDetector
java.lang.Object
org.geysermc.floodgate.core.addon.debug.StateChangeDetector
-
Constructor Summary
ConstructorsConstructorDescriptionStateChangeDetector(io.netty.channel.Channel channel, String packetEncoderName, String packetDecoderName, org.geysermc.floodgate.api.logger.FloodgateLogger logger) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckPacket(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.booleanshouldPrintPacket(io.netty.buffer.ByteBuf packet, boolean clientbound) booleanshouldPrintPlayPacket(io.netty.buffer.ByteBuf packet, boolean clientbound)
-
Constructor Details
-
StateChangeDetector
-
-
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 checkfromClient- 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
-