Class MinecraftConstants

java.lang.Object
org.geysermc.mcprotocollib.protocol.MinecraftConstants

public final class MinecraftConstants extends Object
Class containing various constants for Minecraft sessions.
  • Field Details

    • PROFILE_KEY

      public static final Flag<GameProfile> PROFILE_KEY
      Session flag where the user GameProfile is stored.
    • SESSION_SERVICE_KEY

      public static final Flag<SessionService> SESSION_SERVICE_KEY
      Session flag for providing a custom SessionService instance.
    • AUTOMATIC_KEEP_ALIVE_MANAGEMENT

      public static final Flag<Boolean> AUTOMATIC_KEEP_ALIVE_MANAGEMENT
      Session flag for whether to automatically send a keep alive packet.
      For servers: determines if the keep alive task is run.
      For clients: determines if MCProtocolLib automatically sends back a packet when the server sends their keep alive packet.
    • ACCESS_TOKEN_KEY

      public static final Flag<String> ACCESS_TOKEN_KEY
      Session flag where the user's access token is stored. Client only.
    • SERVER_INFO_HANDLER_KEY

      public static final Flag<ServerInfoHandler> SERVER_INFO_HANDLER_KEY
      Session flag for providing a custom server info response handler. Client only.
    • SERVER_PING_TIME_HANDLER_KEY

      public static final Flag<ServerPingTimeHandler> SERVER_PING_TIME_HANDLER_KEY
      Session flag for providing a custom ping time response handler. Client only.
    • VERIFY_USERS_KEY

      public static final Flag<Boolean> VERIFY_USERS_KEY
      Session flag for determining whether to verify users. Server only.
    • SERVER_INFO_BUILDER_KEY

      public static final Flag<ServerInfoBuilder> SERVER_INFO_BUILDER_KEY
      Session flag for providing a custom server info response builder. Server only.
    • SERVER_LOGIN_HANDLER_KEY

      public static final Flag<ServerLoginHandler> SERVER_LOGIN_HANDLER_KEY
      Session flag for providing a custom server login handler. Server only.
    • PING_KEY

      public static final Flag<Long> PING_KEY
      Session flag for storing the current ping time. Server only.
    • SERVER_CHANNEL_INITIALIZER

      public static final Flag<TcpServerChannelInitializer.Factory> SERVER_CHANNEL_INITIALIZER
      Custom TcpServerChannelInitializer impl
    • CLIENT_CHANNEL_INITIALIZER

      public static final Flag<TcpClientChannelInitializer.Factory> CLIENT_CHANNEL_INITIALIZER
      Custom TcpClientChannelInitializer impl
    • CHUNK_SECTION_COUNT_PROVIDER

      public static ChunkSectionCountProvider CHUNK_SECTION_COUNT_PROVIDER
      Mandatory provider that must be set to deserialize ClientboundLevelChunkWithLight packets
    • SERVER_COMPRESSION_THRESHOLD

      public static final Flag<Integer> SERVER_COMPRESSION_THRESHOLD
      Session flag for determining the packet compression threshold. Server only.
    • PACKET_HEADER

      public static final PacketHeader PACKET_HEADER
      The packet header used by Minecraft.
    • SRV_RECORD_PREFIX

      public static final String SRV_RECORD_PREFIX
      The SRV Record prefix used by Minecraft.
      See Also:
    • SERVER_CLOSING_MESSAGE

      public static final String SERVER_CLOSING_MESSAGE
      See Also: