Class KhazConfig
java.lang.Object
com.khazoda.core.KhazConfig
KhazConfig is a simple multiloader config helper built into KhazodaCore.
Config files are generated and read from {mod_id}.properties files in /config
It's not recommended to use this class yourself. Its structure may change over time and there may be breaking changes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic interface -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyServerSyncedValues(Map<String, String> serializedValues) static KhazConfig.Entry<Boolean> voidstatic KhazConfig.Entry<Double> <T> Tget(KhazConfig.Entry<T> entry) static KhazConfig.Entry<Integer> voidload()static KhazConfigof(String modName, String modId, Path configDirectory, KhazConfig.Entry<?>... entries) voidreload()static KhazConfig.Entry<String>
-
Method Details
-
of
public static KhazConfig of(String modName, String modId, Path configDirectory, KhazConfig.Entry<?>... entries) -
bool
-
integer
public static KhazConfig.Entry<Integer> integer(String key, int defaultValue, int min, int max, String comment) -
decimal
public static KhazConfig.Entry<Double> decimal(String key, double defaultValue, double min, double max, String comment) -
string
-
load
public void load() -
reload
public void reload() -
get
-
createServerSyncSnapshot
-
applyServerSyncedValues
-
clearServerSyncedValuesAndReload
public void clearServerSyncedValuesAndReload()
-