Class HandshakeHandler

All Implemented Interfaces:
ConnectionHandler, IPacketReceiver
Direct Known Subclasses:
AuthenticationPacketHandler

public abstract class HandshakeHandler extends GenericConnectionPacketHandler
Base handler for authentication handshake (player connections and status requests). Implements mutual authentication via AuthGrant/AuthToken/ServerAuthToken packets. Identity token and player data are received via the Connect packet (not Auth packet).
  • Constructor Details

  • Method Details

    • handlesPacket

      public boolean handlesPacket(int packetId)
      Description copied from interface: ConnectionHandler
      Tests if this handler accepts packets with the given ID in its current state. Transports call this when the frame header arrives, before they buffer or decompress the payload, and close the connection if it returns false.
      Parameters:
      packetId - The ID of the received packet
    • accept

      public void accept(@Nonnull ToServerPacket packet)
      Description copied from class: PacketHandler
      Called to accept the given incoming packet
      Specified by:
      accept in class PacketHandler
      Parameters:
      packet - The packet instance to accept
    • registered0

      public void registered0(ConnectionHandler oldHandler)
    • handle

      public void handle(@Nonnull ClientDisconnect packet)
    • handle

      public void handle(@Nonnull AuthToken packet)