Contents
Class LiveConfigModule
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.server.core.liveconfig.LiveConfigModule
- All Implemented Interfaces:
CommandOwner
Core plugin that fetches pre-evaluated feature flags from the live config service
and exposes them for gameplay systems to query.
Flags are stored in an immutable LiveConfigSnapshot swapped atomically via
a volatile reference. All flag reads are lock-free.
Usage:
var liveConfig = LiveConfigModule.get();
if (liveConfig != null && liveConfig.getBoolFlag("enable_feature", false)) {
// feature is enabled
}
-
Field Summary
FieldsFields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidTriggers an immediate refresh cycle.static LiveConfigModuleget()booleangetBoolFlag(String name, boolean defaultValue) intgetIntFlag(String name, int defaultValue) Gets the current snapshot.getStringFlag(String name, String defaultValue) booleanMethods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Field Details
-
MANIFEST
-
-
Constructor Details
-
LiveConfigModule
-
-
Method Details
-
get
-
getBoolFlag
-
getIntFlag
-
getStringFlag
-
hasFlag
-
getSnapshot
Gets the current snapshot. Useful for diagnostics. -
forceRefresh
public void forceRefresh()Triggers an immediate refresh cycle. Intended for test harness use (via DevTools endpoint) — not for production gameplay code.
-