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
    • spawning

      protected boolean spawning
    • 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()