Class ConfigHolder
java.lang.Object
se.itssimple.obsidianweave.data.ConfigHolder
Holds configuration entries for a specific mod in Obsidian Weave.
Provides access to config values and entry lookup by key.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigHolder(String modId, List<ConfigEntry<?>> configEntryList) Constructs a config holder for the given mod ID and entries. -
Method Summary
Modifier and TypeMethodDescriptionList<ConfigEntry<?>> Gets all config entries for this mod.booleangetBoolean(String key) Gets a boolean config value by key.Gets a double config value by key.<T> Optional<ConfigEntry<T>> Gets a config entry by key, if present.getInteger(String key) Gets an integer config value by key.getModId()Gets the mod ID for this config holder.Gets a string config value by key.
-
Constructor Details
-
ConfigHolder
Constructs a config holder for the given mod ID and entries.- Parameters:
modId- The mod ID.configEntryList- The list of config entries.
-
-
Method Details
-
getModId
-
getAllEntries
Gets all config entries for this mod.- Returns:
- List of config entries.
-
getEntry
Gets a config entry by key, if present.- Type Parameters:
T- The entry type.- Parameters:
key- The config key.- Returns:
- Optional config entry.
-
getBoolean
Gets a boolean config value by key.- Parameters:
key- The config key.- Returns:
- The boolean value, or false if not present.
-
getInteger
-
getString
-
getDouble
-