Class SetupPacketHandler

All Implemented Interfaces:
ConnectionHandler, IPacketReceiver

public class SetupPacketHandler extends GenericConnectionPacketHandler
  • Constructor Details

  • Method Details

    • getIdentifier

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

      @Nonnull public ProfileServiceClient.PublicGameProfile getAccountProfile()
      Description copied from class: PacketHandler
      Returns the account to track for lookups, bans, and kicks.

      Override this method for authenticated handlers. The profile must be available before registration and remain available through cleanup. The account UUID and whether this method returns null must remain stable for this handler's lifetime. Keep this method nonblocking and free of side effects. Registry membership does not perform access checks.

      Overrides:
      getAccountProfile in class PacketHandler
      Returns:
      the account to track, or null to exclude this handler
    • registered0

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

      public void closed(@Nullable NetworkChannel networkChannel)
      Description copied from interface: ConnectionHandler
      Called when the affiliated network channel has been closed.
      Specified by:
      closed in interface ConnectionHandler
      Overrides:
      closed in class PacketHandler
      Parameters:
      networkChannel - The network channel that was closed, or null if unknown
    • handle

      public void handle(@Nonnull ClientDisconnect packet)
    • handle

      public void handle(@Nonnull RequestAssets packet)
    • handle

      public void handle(@Nonnull ViewRadius packet)
    • handle

      public void handle(@Nonnull SetupFinalize packet)