Class ServerSession

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.SimpleChannelInboundHandler<Packet>
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, Session

public class ServerSession extends TcpServerSession
  • Field Details

    • isTransferring

      protected boolean isTransferring
    • cookieCache

      protected final CookieCache 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
    • spawned

      protected boolean spawned
    • spawnTeleportId

      protected final int spawnTeleportId
      See Also:
    • allowSpectatorServerPlayerPosRotate

      protected boolean allowSpectatorServerPlayerPosRotate
    • cameraTarget

      protected Entity cameraTarget
    • showSelfEntity

      protected boolean showSelfEntity
    • spectatorEntityId

      protected int spectatorEntityId
    • spectatorSelfEntityId

      protected int spectatorSelfEntityId
    • spectatorEntityUUID

      protected UUID spectatorEntityUUID
    • profileCache

      protected ServerProfileCache profileCache
    • spectatorFakeProfileCache

      protected ServerProfileCache spectatorFakeProfileCache
    • spectatorPlayerCache

      protected PlayerCache spectatorPlayerCache
    • spectatorEntity

      protected SpectatorEntity spectatorEntity
    • clientInfoCache

      protected ClientInfoCache clientInfoCache
    • LOGIN_RATE_LIMITER

      public static final LoginRateLimiter LOGIN_RATE_LIMITER
    • currentTeamMembers

      protected List<String> currentTeamMembers
      Team data
  • Constructor Details

  • Method Details

    • getKeyPair

      public KeyPair getKeyPair()
    • getServerId

      public String getServerId()
    • getEventLoop

      public io.netty.channel.EventLoop getEventLoop()
    • callPacketReceived

      public void callPacketReceived(Packet packet)
      Specified by:
      callPacketReceived in interface Session
      Overrides:
      callPacketReceived in class TcpSession
    • callPacketSending

      public Packet callPacketSending(Packet packet)
      Specified by:
      callPacketSending in interface Session
      Overrides:
      callPacketSending in class TcpSession
    • callPacketSent

      public void callPacketSent(Packet packet)
      Specified by:
      callPacketSent in interface Session
      Overrides:
      callPacketSent in class TcpSession
    • callPacketError

      public boolean callPacketError(Throwable throwable)
      Specified by:
      callPacketError in interface Session
      Overrides:
      callPacketError in class TcpSession
    • callConnected

      public void callConnected()
      Specified by:
      callConnected in interface Session
      Overrides:
      callConnected in class TcpSession
    • callDisconnecting

      public void callDisconnecting(net.kyori.adventure.text.Component reason, Throwable cause)
      Specified by:
      callDisconnecting in interface Session
      Overrides:
      callDisconnecting in class TcpSession
    • callDisconnected

      public void callDisconnected(net.kyori.adventure.text.Component reason, Throwable cause)
      Specified by:
      callDisconnected in interface Session
      Overrides:
      callDisconnected in class TcpSession
    • disconnect

      public void disconnect(@Nullable net.kyori.adventure.text.Component reason, Throwable cause)
      Specified by:
      disconnect in interface Session
      Overrides:
      disconnect in class TcpSession
    • setLoggedIn

      public void setLoggedIn()
    • sendAsyncAlert

      public void sendAsyncAlert(String minimessage)
    • sendAsyncMessage

      public void sendAsyncMessage(net.kyori.adventure.text.Component message)
    • sendAsyncMessage

      public void sendAsyncMessage(String message)
    • isActivePlayer

      public boolean isActivePlayer()
    • getEntitySpawnPacket

      public Packet getEntitySpawnPacket()
    • getSelfEntityMetadataPacket

      public ClientboundSetEntityDataPacket getSelfEntityMetadataPacket()
    • getEntityMetadataPacket

      public ClientboundSetEntityDataPacket getEntityMetadataPacket()
    • getSoundPacket

      public Optional<Packet> getSoundPacket()
    • hasCameraTarget

      public boolean hasCameraTarget()
    • setSpectatorEntity

      public boolean setSpectatorEntity(String identifier)
    • initializeTeam

      public void initializeTeam()
    • syncTeamMembers

      public void syncTeamMembers()
    • getMCVersion

      public String getMCVersion()
    • getProtocolVersion

      public com.viaversion.viaversion.api.protocol.version.ProtocolVersion getProtocolVersion()
    • getName

      public String getName()
    • getUUID

      public UUID getUUID()
    • canTransfer

      public boolean canTransfer()
    • transfer

      public void transfer(String address, int port)
    • transferToSpectator

      public void transferToSpectator(String address, int port)
    • transferToSpectator

      public void transferToSpectator()
    • transferToControllingPlayer

      public void transferToControllingPlayer(String address, int port)
    • transferToControllingPlayer

      public void transferToControllingPlayer()
    • getChallenge

      public byte[] getChallenge()
    • getUsername

      public String getUsername()
    • getDefaultUUID

      public UUID getDefaultUUID()
    • getLoginProfileUUID

      public UUID getLoginProfileUUID()
    • getProtocolVersionId

      public int getProtocolVersionId()
    • getConnectingServerAddress

      public String getConnectingServerAddress()
    • getConnectingServerPort

      public int getConnectingServerPort()
    • isTransferring

      public boolean isTransferring()
    • getCookieCache

      public CookieCache 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()
    • isSpawned

      public boolean isSpawned()
    • getSpawnTeleportId

      public int getSpawnTeleportId()
    • isAllowSpectatorServerPlayerPosRotate

      public boolean isAllowSpectatorServerPlayerPosRotate()
    • getCameraTarget

      public Entity getCameraTarget()
    • isShowSelfEntity

      public boolean isShowSelfEntity()
    • getSpectatorEntityId

      public int getSpectatorEntityId()
    • getSpectatorSelfEntityId

      public int getSpectatorSelfEntityId()
    • getSpectatorEntityUUID

      public UUID getSpectatorEntityUUID()
    • getProfileCache

      public ServerProfileCache getProfileCache()
    • getSpectatorFakeProfileCache

      public ServerProfileCache getSpectatorFakeProfileCache()
    • getSpectatorPlayerCache

      public PlayerCache getSpectatorPlayerCache()
    • getSpectatorEntity

      public SpectatorEntity getSpectatorEntity()
    • getConnectionTimeEpochMs

      public long getConnectionTimeEpochMs()
    • getClientInfoCache

      public ClientInfoCache getClientInfoCache()
    • getCurrentTeamMembers

      public List<String> getCurrentTeamMembers()
      Team data
    • setUsername

      public void setUsername(String username)
    • setLoginProfileUUID

      public void setLoginProfileUUID(UUID loginProfileUUID)
    • setProtocolVersionId

      public void setProtocolVersionId(int protocolVersionId)
    • setConnectingServerAddress

      public void setConnectingServerAddress(String connectingServerAddress)
    • 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)
    • setSpawned

      public void setSpawned(boolean spawned)
    • setAllowSpectatorServerPlayerPosRotate

      public void setAllowSpectatorServerPlayerPosRotate(boolean allowSpectatorServerPlayerPosRotate)
    • setCameraTarget

      public void setCameraTarget(Entity cameraTarget)
    • setShowSelfEntity

      public void setShowSelfEntity(boolean showSelfEntity)
    • setSpectatorEntityId

      public void setSpectatorEntityId(int spectatorEntityId)
    • setSpectatorSelfEntityId

      public void setSpectatorSelfEntityId(int spectatorSelfEntityId)
    • setSpectatorEntityUUID

      public void setSpectatorEntityUUID(UUID spectatorEntityUUID)
    • setProfileCache

      public void setProfileCache(ServerProfileCache profileCache)
    • setSpectatorFakeProfileCache

      public void setSpectatorFakeProfileCache(ServerProfileCache spectatorFakeProfileCache)
    • setSpectatorPlayerCache

      public void setSpectatorPlayerCache(PlayerCache spectatorPlayerCache)
    • setClientInfoCache

      public void setClientInfoCache(ClientInfoCache clientInfoCache)
    • setCurrentTeamMembers

      public void setCurrentTeamMembers(List<String> currentTeamMembers)
      Team data
    • getPacketRateLimiter

      public PacketRateLimiter getPacketRateLimiter()