generated from Bawnorton/BawnortonModTemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Configurable API
Bawnorton edited this page Aug 4, 2025
·
9 revisions
Configurable's API provides the means of saving and syncing set values as its not feasible to do that automatically.
Simply call ConfigurableApi.saveChanges() and the rest is done for you. Configurable looks through your jar for its config file (that it adds to your jar's META-INF at compile time) to figure out which config is being referenced, reads the values of your annotated fields and writes them to disk.
Same as saving, but you need to provide the world/level and a boolean for whether to sync to all players: ConfigurableApi.saveChanges(world/level, true). Fields with sync = false are ignored.