Interface ModConfig
public interface ModConfig
Settings of one mod:
<forge>/mods/<id>/config.toml, over the defaults in the mod's
jar (META-INF/zomboidforge/config.toml). A key missing from the file takes the
default. The table [forge] belongs to ZomboidForge and is not part of these settings.
Keys are snake_case; record components and paths use the same names converted
from camelCase (maxBalance reads max_balance).
-
Method Summary
-
Method Details
-
bind
Creates a record from the settings. Supported component types:String,boolean,int,long,float,double(and their wrappers), enums (by constant name), records (TOML tables),List<T>,Map<String, T>(tables with free keys), andOptional<T>for values that may be missing. Every other component must have a value. Keys without a component are logged as warnings.- Throws:
IllegalStateException- listing every missing or mistyped value
-
get
The value at a dotted path, e.g."features.max_balance", converted like a record component oftype. Primitive values use the wrapper types (Long.class).- Throws:
IllegalStateException- when the value exists but has another type
-