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.
    • SEND_BLANK_KNOWN_PACKS_RESPONSE

      public static final Flag<Boolean> SEND_BLANK_KNOWN_PACKS_RESPONSE
      Session flag for determining if an automatic response should be sent to the ClientboundSelectKnownPacks.
    • FOLLOW_TRANSFERS

      public static final Flag<Boolean> FOLLOW_TRANSFERS
      Session flag for determining whether to create a new TcpClientSession when the Java server sends a ClientboundTransferPacket.
    • ENCRYPT_CONNECTION

      public static final Flag<Boolean> ENCRYPT_CONNECTION
      Session flag for determining whether to encrypt the connection. Server only.
    • SHOULD_AUTHENTICATE

      public static final Flag<Boolean> SHOULD_AUTHENTICATE
      Session flag for determining whether to authenticate users with the session service. Server only.
    • ACCEPT_TRANSFERS_KEY

      public static final Flag<Boolean> ACCEPT_TRANSFERS_KEY
      Session flag for determining whether to accept transferred connections. 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_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: