Allow Players to Edit Mod Settings Without Restarting
Understanding Hot Reload
AzusaConfig supports configuration reloading without a full game restart. When a player saves changes to a config file, the mod can detect and apply those changes immediately.
Implementing Reload Listeners
Register callback methods that trigger whenever your config file is modified. These listeners should update any cached values or in-game state that depends on the configuration.
Testing Config Changes
Edit your mod's config file while the game is running, save it, and observe whether the changes take effect. If using a text editor, ensure the file is properly saved before checking in-game.
Best Practices
Not all settings can be safely reloaded mid-game—some may require a world reload or dimension change. Document which settings require a restart and which can be changed live. This improves the player experience by avoiding unnecessary downtime.