Bind Config Options to Your Mod's Settings File
Connecting Options to Your Config
YetAnotherConfigLib options must be linked to your actual mod settings so changes persist. Use the builder's binding system to connect each on-screen option to a field or property in your config object.
Setting Up Bindings
1. Create or load your mod's config file (JSON, TOML, or custom format)
2. When adding each option to the builder, specify its getter and setter methods
3. The getter retrieves the current value from your config
4. The setter updates your config when the player changes the option
5. Ensure your config file saves after changes are applied
Testing Your Bindings
Change a setting in-game, close and reopen the config screen to verify the value persisted. Restart your game and check that settings loaded correctly from the file. If bindings aren't working, confirm your getter/setter methods are correctly referencing your config object. YetAnotherConfigLib handles the UI side; you're responsible for ensuring your config backend saves and loads properly.