Class ServerSession
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Packet>
org.geysermc.mcprotocollib.network.tcp.TcpSession
org.geysermc.mcprotocollib.network.tcp.TcpServerSession
com.zenith.network.server.ServerSession
- All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, Session
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Entityprotected ClientInfoCacheprotected booleanprotected longprotected final CookieCacheTeam dataprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected longprotected longprotected longprotected longstatic final LoginRateLimiterprotected longprotected ServerProfileCacheprotected booleanprotected booleanprotected booleanprotected final intprotected SpectatorEntityprotected intprotected UUIDprotected ServerProfileCacheprotected PlayerCacheprotected intprotected booleanFields inherited from class TcpSession
disconnected, HA_PROXY_ENCODER_ID, host, ID, port, PROXY_HANDLER_ID, READ_TIMEOUT_HANDLER_ID, WRITE_TIMEOUT_HANDLER_ID -
Constructor Summary
ConstructorsConstructorDescriptionServerSession(String host, int port, MinecraftProtocol protocol, TcpServer server) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidcallDisconnected(net.kyori.adventure.text.Component reason, Throwable cause) voidcallDisconnecting(net.kyori.adventure.text.Component reason, Throwable cause) booleancallPacketError(Throwable throwable) voidcallPacketReceived(Packet packet) callPacketSending(Packet packet) voidcallPacketSent(Packet packet) booleanvoiddisconnect(@Nullable net.kyori.adventure.text.Component reason, Throwable cause) byte[]longintlongTeam dataio.netty.channel.EventLooplonglonglonglonggetName()longgetPing()com.viaversion.viaversion.api.protocol.version.ProtocolVersionintintintintgetUUID()booleanvoidbooleanbooleanbooleanbooleanbooleanisPlayer()booleanbooleanbooleanbooleanbooleanbooleanvoidsendAsyncAlert(String minimessage) voidsendAsyncMessage(String message) voidsendAsyncMessage(net.kyori.adventure.text.Component message) voidsetCameraTarget(Entity cameraTarget) voidsetClientInfoCache(ClientInfoCache clientInfoCache) voidsetClientLoaded(boolean clientLoaded) voidsetClientLoadedTimeout(long clientLoadedTimeout) voidsetConfigured(boolean isConfigured) voidsetConnectingServerAddress(String connectingServerAddress) voidsetConnectingServerPort(int connectingServerPort) voidsetCurrentTeamMembers(List<String> currentTeamMembers) Team datavoidsetLastKeepAliveId(long lastKeepAliveId) voidsetLastKeepAliveTime(long lastKeepAliveTime) voidsetLastPingId(long lastPingId) voidsetLastPingTime(long lastPingTime) voidvoidsetLoggedIn(boolean isLoggedIn) voidsetLoginProfileUUID(UUID loginProfileUUID) voidsetPing(long ping) voidsetPlayer(boolean isPlayer) voidsetProfileCache(ServerProfileCache profileCache) voidsetProtocolVersionId(int protocolVersionId) voidsetShowSelfEntity(boolean showSelfEntity) voidsetSpawned(boolean spawned) voidsetSpawning(boolean spawning) voidsetSpectator(boolean isSpectator) booleansetSpectatorEntity(String identifier) voidsetSpectatorEntityId(int spectatorEntityId) voidsetSpectatorEntityUUID(UUID spectatorEntityUUID) voidsetSpectatorFakeProfileCache(ServerProfileCache spectatorFakeProfileCache) voidsetSpectatorPlayerCache(PlayerCache spectatorPlayerCache) voidsetSpectatorSelfEntityId(int spectatorSelfEntityId) voidsetTransferring(boolean isTransferring) voidsetUsername(String username) voidsetWhitelistChecked(boolean whitelistChecked) voidvoidvoidvoidtransferToControllingPlayer(String address, int port) voidvoidtransferToSpectator(String address, int port) Methods inherited from class TcpServerSession
channelActive, channelInactive, getFlag, getFlags, hasFlagMethods inherited from class TcpSession
addListener, channelRead0, connect, connect, connect, enableEncryption, exceptionCaught, flush, getChannel, getCompressionThreshold, getConnectTimeout, getFlag, getHost, getListeners, getLocalAddress, getPacketProtocol, getPort, getProtocol, getReadTimeout, getRemoteAddress, getWriteTimeout, isConnected, isDisconnected, refreshReadTimeoutHandler, refreshReadTimeoutHandler, refreshWriteTimeoutHandler, refreshWriteTimeoutHandler, removeListener, send, send, sendAsync, sendAwait, sendBundle, sendBundle, sendBundleDirect, sendBundleDirect, sendDelayedDirect, sendDirect, sendScheduledAsync, setAutoRead, setChannel, setCompressionThreshold, setCompressionThreshold, setConnectTimeout, setDisconnected, setFlag, setFlags, setHost, setListeners, setPort, setReadTimeout, setWriteTimeoutMethods inherited from class io.netty.channel.SimpleChannelInboundHandler
acceptInboundMessage, channelReadMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemovedMethods inherited from interface Session
disconnect, disconnect, disconnect, getPalettedWorldState, switchInboundState, switchOutboundState
-
Field Details
-
isTransferring
protected boolean isTransferring -
cookieCache
-
lastPingId
protected long lastPingId -
lastPingTime
protected long lastPingTime -
ping
protected long ping -
lastKeepAliveId
protected long lastKeepAliveId -
lastKeepAliveTime
protected long lastKeepAliveTime -
whitelistChecked
protected boolean whitelistChecked -
isPlayer
protected boolean isPlayer -
isLoggedIn
protected boolean isLoggedIn -
isSpectator
protected boolean isSpectator -
isConfigured
protected boolean isConfigured -
spawning
protected boolean spawning -
spawned
protected boolean spawned -
spawnTeleportId
protected final int spawnTeleportId- See Also:
-
clientLoaded
protected boolean clientLoaded -
clientLoadedTimeout
protected long clientLoadedTimeout -
cameraTarget
-
showSelfEntity
protected boolean showSelfEntity -
spectatorEntityId
protected int spectatorEntityId -
spectatorSelfEntityId
protected int spectatorSelfEntityId -
spectatorEntityUUID
-
profileCache
-
spectatorFakeProfileCache
-
spectatorPlayerCache
-
spectatorEntity
-
clientInfoCache
-
LOGIN_RATE_LIMITER
-
currentTeamMembers
-
-
Constructor Details
-
ServerSession
-
-
Method Details
-
getKeyPair
-
getServerId
-
getEventLoop
public io.netty.channel.EventLoop getEventLoop() -
callPacketReceived
- Specified by:
callPacketReceivedin interfaceSession- Overrides:
callPacketReceivedin classTcpSession
-
callPacketSending
- Specified by:
callPacketSendingin interfaceSession- Overrides:
callPacketSendingin classTcpSession
-
callPacketSent
- Specified by:
callPacketSentin interfaceSession- Overrides:
callPacketSentin classTcpSession
-
callPacketError
- Specified by:
callPacketErrorin interfaceSession- Overrides:
callPacketErrorin classTcpSession
-
callConnected
public void callConnected()- Specified by:
callConnectedin interfaceSession- Overrides:
callConnectedin classTcpSession
-
callDisconnecting
- Specified by:
callDisconnectingin interfaceSession- Overrides:
callDisconnectingin classTcpSession
-
callDisconnected
- Specified by:
callDisconnectedin interfaceSession- Overrides:
callDisconnectedin classTcpSession
-
disconnect
- Specified by:
disconnectin interfaceSession- Overrides:
disconnectin classTcpSession
-
setLoggedIn
public void setLoggedIn() -
sendAsyncAlert
-
sendAsyncMessage
public void sendAsyncMessage(net.kyori.adventure.text.Component message) -
sendAsyncMessage
-
isActivePlayer
public boolean isActivePlayer() -
getEntitySpawnPacket
-
getSelfEntityMetadataPacket
-
getEntityMetadataPacket
-
getSoundPacket
-
hasCameraTarget
public boolean hasCameraTarget() -
setSpectatorEntity
-
initializeTeam
public void initializeTeam() -
syncTeamMembers
public void syncTeamMembers() -
getMCVersion
-
getProtocolVersion
public com.viaversion.viaversion.api.protocol.version.ProtocolVersion getProtocolVersion() -
getName
-
getUUID
-
canTransfer
public boolean canTransfer() -
transfer
-
transferToSpectator
-
transferToSpectator
public void transferToSpectator() -
transferToControllingPlayer
-
transferToControllingPlayer
public void transferToControllingPlayer() -
getChallenge
public byte[] getChallenge() -
getUsername
-
getDefaultUUID
-
getLoginProfileUUID
-
getProtocolVersionId
public int getProtocolVersionId() -
getConnectingServerAddress
-
getConnectingServerPort
public int getConnectingServerPort() -
isTransferring
public boolean isTransferring() -
getCookieCache
-
getLastPingId
public long getLastPingId() -
getLastPingTime
public long getLastPingTime() -
getPing
public long getPing() -
getLastKeepAliveId
public long getLastKeepAliveId() -
getLastKeepAliveTime
public long getLastKeepAliveTime() -
isWhitelistChecked
public boolean isWhitelistChecked() -
isPlayer
public boolean isPlayer() -
isLoggedIn
public boolean isLoggedIn() -
isSpectator
public boolean isSpectator() -
isConfigured
public boolean isConfigured() -
isSpawning
public boolean isSpawning() -
isSpawned
public boolean isSpawned() -
getSpawnTeleportId
public int getSpawnTeleportId() -
isClientLoaded
public boolean isClientLoaded() -
getClientLoadedTimeout
public long getClientLoadedTimeout() -
getCameraTarget
-
isShowSelfEntity
public boolean isShowSelfEntity() -
getSpectatorEntityId
public int getSpectatorEntityId() -
getSpectatorSelfEntityId
public int getSpectatorSelfEntityId() -
getSpectatorEntityUUID
-
getProfileCache
-
getSpectatorFakeProfileCache
-
getSpectatorPlayerCache
-
getSpectatorEntity
-
getConnectionTimeEpochMs
public long getConnectionTimeEpochMs() -
getClientInfoCache
-
getCurrentTeamMembers
-
setUsername
-
setLoginProfileUUID
-
setProtocolVersionId
public void setProtocolVersionId(int protocolVersionId) -
setConnectingServerAddress
-
setConnectingServerPort
public void setConnectingServerPort(int connectingServerPort) -
setTransferring
public void setTransferring(boolean isTransferring) -
setLastPingId
public void setLastPingId(long lastPingId) -
setLastPingTime
public void setLastPingTime(long lastPingTime) -
setPing
public void setPing(long ping) -
setLastKeepAliveId
public void setLastKeepAliveId(long lastKeepAliveId) -
setLastKeepAliveTime
public void setLastKeepAliveTime(long lastKeepAliveTime) -
setWhitelistChecked
public void setWhitelistChecked(boolean whitelistChecked) -
setPlayer
public void setPlayer(boolean isPlayer) -
setLoggedIn
public void setLoggedIn(boolean isLoggedIn) -
setSpectator
public void setSpectator(boolean isSpectator) -
setConfigured
public void setConfigured(boolean isConfigured) -
setSpawning
public void setSpawning(boolean spawning) -
setSpawned
public void setSpawned(boolean spawned) -
setClientLoaded
public void setClientLoaded(boolean clientLoaded) -
setClientLoadedTimeout
public void setClientLoadedTimeout(long clientLoadedTimeout) -
setCameraTarget
-
setShowSelfEntity
public void setShowSelfEntity(boolean showSelfEntity) -
setSpectatorEntityId
public void setSpectatorEntityId(int spectatorEntityId) -
setSpectatorSelfEntityId
public void setSpectatorSelfEntityId(int spectatorSelfEntityId) -
setSpectatorEntityUUID
-
setProfileCache
-
setSpectatorFakeProfileCache
-
setSpectatorPlayerCache
-
setClientInfoCache
-
setCurrentTeamMembers
-
getPacketRateLimiter
-