Package net.minecraft.server.network
Class ServerCommonPacketListenerImpl
java.lang.Object
net.minecraft.server.network.ServerCommonPacketListenerImpl
- All Implemented Interfaces:
PacketListener
,ServerCommonPacketListener
,ServerPacketListener
,ServerboundPacketListener
- Direct Known Subclasses:
ServerConfigurationPacketListenerImpl
,ServerGamePacketListenerImpl
public abstract class ServerCommonPacketListenerImpl
extends Object
implements ServerCommonPacketListener
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Connection
private long
private boolean
private long
private int
static final int
private static final org.slf4j.Logger
protected final MinecraftServer
private boolean
private static final Component
-
Constructor Summary
ConstructorsConstructorDescriptionServerCommonPacketListenerImpl
(MinecraftServer p_299469_, Connection p_300872_, CommonListenerCookie p_300277_) -
Method Summary
Modifier and TypeMethodDescriptionprotected CommonListenerCookie
createCookie
(ClientInformation p_297318_) void
disconnect
(Component p_299122_) com.mojang.authlib.GameProfile
getOwner()
void
void
handleKeepAlive
(ServerboundKeepAlivePacket p_299975_) void
handlePong
(ServerboundPongPacket p_299461_) void
protected boolean
protected void
int
latency()
void
onDisconnect
(Component p_300550_) protected abstract com.mojang.authlib.GameProfile
void
void
void
send
(Packet<?> p_300325_, PacketSendListener p_301165_) void
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.PacketListener
isAcceptingMessages, protocol, shouldHandleMessage
Methods inherited from interface net.minecraft.network.ServerboundPacketListener
flow
Methods inherited from interface net.minecraft.network.protocol.common.ServerCommonPacketListener
handleClientInformation
Methods inherited from interface net.minecraft.network.protocol.game.ServerPacketListener
shouldPropagateHandlingExceptions
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
LATENCY_CHECK_INTERVAL
public static final int LATENCY_CHECK_INTERVAL- See Also:
-
TIMEOUT_DISCONNECTION_MESSAGE
-
server
-
connection
-
keepAliveTime
private long keepAliveTime -
keepAlivePending
private boolean keepAlivePending -
keepAliveChallenge
private long keepAliveChallenge -
latency
private int latency -
suspendFlushingOnServerThread
private volatile boolean suspendFlushingOnServerThread
-
-
Constructor Details
-
ServerCommonPacketListenerImpl
public ServerCommonPacketListenerImpl(MinecraftServer p_299469_, Connection p_300872_, CommonListenerCookie p_300277_)
-
-
Method Details
-
onDisconnect
- Specified by:
onDisconnect
in interfacePacketListener
-
handleKeepAlive
- Specified by:
handleKeepAlive
in interfaceServerCommonPacketListener
-
handlePong
- Specified by:
handlePong
in interfaceServerCommonPacketListener
-
handleCustomPayload
- Specified by:
handleCustomPayload
in interfaceServerCommonPacketListener
-
handleResourcePackResponse
- Specified by:
handleResourcePackResponse
in interfaceServerCommonPacketListener
-
keepConnectionAlive
protected void keepConnectionAlive() -
suspendFlushing
public void suspendFlushing() -
resumeFlushing
public void resumeFlushing() -
send
-
send
-
disconnect
-
isSingleplayerOwner
protected boolean isSingleplayerOwner() -
playerProfile
protected abstract com.mojang.authlib.GameProfile playerProfile() -
getOwner
public com.mojang.authlib.GameProfile getOwner() -
latency
public int latency() -
createCookie
-
getConnection
-