Class InitialPacketHandler

java.lang.Object
com.hypixel.hytale.server.core.io.PacketHandler
com.hypixel.hytale.server.core.io.handlers.InitialPacketHandler
All Implemented Interfaces:
ConnectionHandler, IPacketReceiver

public class InitialPacketHandler extends PacketHandler
  • Field Details

  • Constructor Details

    • InitialPacketHandler

      public InitialPacketHandler(@Nonnull ChannelConnection channel)
  • 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
    • disconnect

      public void disconnect(@Nonnull FormattedMessage message)
      Description copied from class: PacketHandler
      Called to disconnect this connection for the given reason.
      Overrides:
      disconnect in class PacketHandler
      Parameters:
      message - The formatted reason in which the connection is being disconnected
    • handle

      public void handle(@Nonnull Connect packet)
    • handle

      public void handle(@Nonnull InsecurePlayerOptions packet)
    • handle

      public void handle(@Nonnull ClientDisconnect packet)