Package net.lcc.sollib.api.common.config
Class SConfigRegistry
java.lang.Object
net.lcc.sollib.api.common.config.SConfigRegistry
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescription@Nullable SolConfig<T> T<T> com.google.gson.JsonElementvoidAutomatically called by any SolConfig in its constructorvoidreload()Reloads every config registered, reading their file and fetching the required ConfigEntry
Automatically called on resource reload
-
Field Details
-
INSTANCE
-
LOG
-
-
Method Details
-
get
- Parameters:
name- The name of the config to get- Returns:
- The corresponding SolConfig instance, or null
-
get
- Parameters:
entry- The identifier for a config entry, a String formatted as "configname:entrypath"fallback- The fallback value to return if the config or path doesn't exist- Returns:
- The value associated with said entry, or fallback if it doesn't exist
-
getRaw
-
register
Automatically called by any SolConfig in its constructor- Parameters:
config- The instance of SolConfig to register
-
reload
@Internal public void reload()Reloads every config registered, reading their file and fetching the required ConfigEntry
Automatically called on resource reload
-