Class PasswordPacketHandler

All Implemented Interfaces:
ConnectionHandler, IPacketReceiver

public class PasswordPacketHandler extends GenericConnectionPacketHandler
Handles password challenge-response authentication. If no password is configured, immediately transitions to SetupPacketHandler.
  • Constructor Details

  • Method Details

    • getIdentifier

      @Nonnull public String getIdentifier()
      Specified by:
      getIdentifier in class PacketHandler
      Returns:
      the unique identifier for this handler
    • registered0

      public void registered0(ConnectionHandler oldHandler)
    • 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
    • handle

      public void handle(@Nonnull ClientDisconnect packet)
    • handle

      public void handle(@Nonnull PasswordResponse packet)