Contents
Class LiveConfigService
java.lang.Object
com.hypixel.hytale.server.core.liveconfig.LiveConfigService
HTTP client for fetching pre-evaluated feature flags from the live config service.
Calls GET /server-configs/{patchline}?os={os}&arch={arch}&version={v} with
the server's game session token (hytale:server scope). The version is the
running server's JAR manifest version; flags whose rollout declares a
serverVersionRange are excluded when the version doesn't satisfy the range
(and therefore fall through to the caller-provided default).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringSystem property to override the live config service URL. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringDetects the current architecture for the platform query parameter.static StringdetectOS()Detects the current OS for the platform query parameter.Fetches the resolved server configs for the given patchline and platform.static booleanReturns true if a URL override is configured (test/dev mode).
-
Field Details
-
URL_OVERRIDE_PROPERTY
System property to override the live config service URL. When set, auth token checks are relaxed (for local testing with DEV_MODE services).- See Also:
-
-
Constructor Details
-
LiveConfigService
public LiveConfigService()
-
-
Method Details
-
hasUrlOverride
public static boolean hasUrlOverride()Returns true if a URL override is configured (test/dev mode). -
fetchServerConfigs
@Nullable public LiveConfigSnapshot fetchServerConfigs(@Nonnull String patchline, @Nonnull String os, @Nonnull String arch, @Nullable String version, @Nullable String currentEtag) Fetches the resolved server configs for the given patchline and platform.- Parameters:
patchline- The patchline (e.g., "release", "pre-release")os- Target OS ("windows", "linux", "darwin")arch- Target architecture ("amd64", "arm64")currentEtag- ETag from the previous fetch, or null for the first fetch- Returns:
- A new snapshot on 200, or null on 304 (not modified) / error
-
detectOS
Detects the current OS for the platform query parameter. -
detectArch
Detects the current architecture for the platform query parameter.
-