Package api.config
Class ConfigUtils
java.lang.Object
api.config.ConfigUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.typesafe.config.ConfigRenderOptions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleancheckExists(AddonConfig addonConfig, String path) Validate a config option key exists already before adding something post-loadstatic voidprotected static @Nullable StringgetValidValues(double min, double max) protected static @Nullable StringgetValidValues(int min, int max) protected static @Nullable StringgetValidValues(long min, long max) static com.typesafe.config.ConfigparseOldConfig(String modId) Reads the old .properties config, if it exists.static com.typesafe.config.ConfigreadCurrentConfig(String modId)
-
Field Details
-
CONFIG_RENDER_OPTIONS
public static final com.typesafe.config.ConfigRenderOptions CONFIG_RENDER_OPTIONS
-
-
Constructor Details
-
ConfigUtils
public ConfigUtils()
-
-
Method Details
-
readCurrentConfig
-
parseOldConfig
Reads the old .properties config, if it exists. The values read will be set for the new config, then the .properties will be renamed to .properties.old -
getValidValues
-
getValidValues
-
getValidValues
-
finishedLoading
public static void finishedLoading() -
checkExists
Validate a config option key exists already before adding something post-load
-