SSCL Wiki

Config Setup

After creating a config, you can create categories and save the config.

category()

Creates or gets a category.

ConfigCategory camera = config.category("camera");

The category name is used as the TOML section, and also shown in Mod Menu.

[camera]

modId()

Gets the mod ID that owns the config.

String modId = config.modId();

side()

Gets the side of the config.

ConfigSide side = config.side();

categories()

Gets all categories in the config.

Collection<ConfigCategory> categories = config.categories();

save()

Saves the current values to the TOML file.

config.save();

SSCL does not save the file every time a value changes.

This means you can change multiple values and save once at the end.