Skip to content

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.

Saving

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.

Syncing

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.

Clone this wiki locally