Class JavaKeepAliveTranslator
java.lang.Object
org.geysermc.geyser.translator.protocol.PacketTranslator<com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundKeepAlivePacket>
org.geysermc.geyser.translator.protocol.java.JavaKeepAliveTranslator
public class JavaKeepAliveTranslator
extends PacketTranslator<com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundKeepAlivePacket>
Used to forward the keep alive packet to the client in order to get back a reliable ping.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermines if this packet should be handled in the session's event loop.voidtranslate(GeyserSession session, com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundKeepAlivePacket packet)
-
Constructor Details
-
JavaKeepAliveTranslator
public JavaKeepAliveTranslator()
-
-
Method Details
-
translate
public void translate(GeyserSession session, com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundKeepAlivePacket packet)- Specified by:
translatein classPacketTranslator<com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundKeepAlivePacket>
-
shouldExecuteInEventLoop
public boolean shouldExecuteInEventLoop()Description copied from class:PacketTranslatorDetermines if this packet should be handled in the session's event loop. This should generally be true - only when the packet has to be executed immediately should it be false.- Overrides:
shouldExecuteInEventLoopin classPacketTranslator<com.github.steveice10.mc.protocol.packet.common.clientbound.ClientboundKeepAlivePacket>
-