# The API at a glance

> Every class, method and constant of the Settings Saver API v1 on one page, with what each does and a link to the guide that explains it.

URL: https://xichil.dev/docs/settings-saver/v1/concepts/api-at-a-glance/ · Updated: 2026-11-16 · Applies to: Fabric, Quilt, Legacy Fabric, Forge, NeoForge, MC 1.7.10 - 26.3

The API is one package, `dev.xichil.settingssaver.api.v1`, with eight types. This page lists all of them.
Follow a link for the full Javadoc or the guide.

## Types

| Type | Kind | You… | Purpose |
| --- | --- | --- | --- |
| [SettingsSaverPlugin](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/SettingsSaverPlugin.html) | interface | implement | Your integration's entry point, found through a service file. |
| [SettingsSaverRegistrar](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/SettingsSaverRegistrar.html) | interface | call | Takes registrations. Settings Saver implements it. |
| [SettingsSaverMods](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/SettingsSaverMods.html) | final class | call | Registration from your own code; holds `MOD_ID`. |
| [ModSettings](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/ModSettings.html) | final class | build | Everything about one mod's settings. Immutable. |
| [ModSettings.Builder](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/ModSettings.Builder.html) | final class | call | Builds a `ModSettings`. |
| [SettingsFileFormat](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/SettingsFileFormat.html) | interface | implement (optional) | Reads a file into a `key -> value` map and writes it back. |
| [SettingsFileFormats](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/SettingsFileFormats.html) | final class | use | The built-in formats. |
| [SettingsFix](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/SettingsFix.html) | interface | implement (optional) | One reversible change to the format of your settings. |
| [SettingsMerger](https://xichil.dev/javadoc/settings-saver/v1/dev/xichil/settingssaver/api/v1/SettingsMerger.html) | interface | implement (optional) | Decides how changed settings go into the profile. |

## SettingsSaverPlugin

| Member | Meaning |
| --- | --- |
| `void register(SettingsSaverRegistrar registrar)` | Called once, early in the launch. Build your `ModSettings` and pass it on. |

Listed in `META-INF/services/dev.xichil.settingssaver.api.v1.SettingsSaverPlugin`. Must be public, with a
public no-argument constructor, top-level or static nested.
Guide: [Your first integration](https://xichil.dev/docs/settings-saver/v1/getting-started/first-integration/index.md).

## SettingsSaverRegistrar

| Member | Meaning |
| --- | --- |
| `void register(ModSettings settings)` | Registers one mod's files. Never throws; a refused registration is logged and ignored. |

Refused when: `settings` is null, the mod id is already registered, a path overlaps one that is already
synced, or a path is `module.txt`.
Guide: [Register files and directories](https://xichil.dev/docs/settings-saver/v1/guides/files-and-directories/index.md#4-avoid-paths-another-mod-already-syncs).

## SettingsSaverMods

| Member | Meaning |
| --- | --- |
| `static final String MOD_ID` | `"settingssaver"`, Settings Saver's mod id on every loader. |
| `static void register(ModSettings settings)` | The same as a plugin's registrar call, from your own code. |
| `static void connect(SettingsSaverRegistrar registrar)` | **Not for mods.** Settings Saver calls it when it starts. |

Guide: [Register from your own code](https://xichil.dev/docs/settings-saver/v1/guides/registering-from-code/index.md).

## ModSettings

| Member | Meaning |
| --- | --- |
| `static Builder builder(String modId, String displayName, String modVersion)` | Starts a description. Throws `IllegalArgumentException` on a bad id or a blank name or version. |
| `String modId()`, `String displayName()`, `String modVersion()` | What was given to `builder`, trimmed. |
| `List<Entry> entries()` | The registered files and directories, in order. |
| `boolean savedByDefault()` | Whether profiles save the mod without being asked. |
| `Set<String> excludedByDefault()` | The default exclusion patterns. |
| `List<ModVersionFix> modVersionFixes()`, `List<MinecraftFix> minecraftFixes()` | The fixes, in the order they were added. |
| `SettingsMerger merger()` | The mod's merger, or null for the default. |

The getters exist for Settings Saver and for [tests](https://xichil.dev/docs/settings-saver/v1/guides/testing/index.md). Mods normally only build.

Mod id rules: starts with a lower case letter or digit, then lower case letters, digits, `_`, `.` or `-`,
at most 64 characters. `vanilla` and `settingssaver` are reserved.

Nested value types, all read-only:

| Type | Members |
| --- | --- |
| `ModSettings.Entry` | `String path()`, `boolean isDirectory()`, `SettingsFileFormat format()` |
| `ModSettings.ModVersionFix` | `String version()`, `SettingsFix fix()` |
| `ModSettings.MinecraftFix` | `String releaseId()` (null if registered by DataVersion), `int dataVersion()` (0 if registered by release id), `SettingsFix fix()` |

## ModSettings.Builder

Every method returns the builder. A mistake throws `IllegalArgumentException` at once.

| Method | Meaning | Guide |
| --- | --- | --- |
| `file(String path)` | One file, synced as a whole. | [Files](https://xichil.dev/docs/settings-saver/v1/guides/files-and-directories/index.md) |
| `file(String path, SettingsFileFormat format)` | One file, synced key by key. | [Formats](https://xichil.dev/docs/settings-saver/v1/guides/choosing-a-format/index.md) |
| `directory(String path)` | Every file in a folder, each as a whole. | [Files](https://xichil.dev/docs/settings-saver/v1/guides/files-and-directories/index.md) |
| `directory(String path, SettingsFileFormat format)` | Every file in a folder, each key by key. | [Files](https://xichil.dev/docs/settings-saver/v1/guides/files-and-directories/index.md) |
| `savedByDefault(boolean saved)` | Whether profiles save the mod without the player turning it on. Default `false`. | [Defaults](https://xichil.dev/docs/settings-saver/v1/guides/defaults/index.md) |
| `excludedByDefault(String... patterns)` | Keys, or `prefix*` patterns, left out of profiles by default. | [Defaults](https://xichil.dev/docs/settings-saver/v1/guides/defaults/index.md#exclude-keys-by-default) |
| `modVersionFix(String firstVersion, SettingsFix fix)` | A format change in your mod, from that version on. | [Mod version fixes](https://xichil.dev/docs/settings-saver/v1/guides/mod-version-fixes/index.md) |
| `minecraftFix(String firstRelease, SettingsFix fix)` | A format change that follows Minecraft, from that release on. | [Minecraft fixes](https://xichil.dev/docs/settings-saver/v1/guides/minecraft-fixes/index.md) |
| `minecraftFix(int firstDataVersion, SettingsFix fix)` | The same, by DataVersion. | [Minecraft fixes](https://xichil.dev/docs/settings-saver/v1/guides/minecraft-fixes/index.md#3-use-a-dataversion-for-snapshots-and-very-new-releases) |
| `merger(SettingsMerger merger)` | Replaces the default merge. Null means the default. | [Merging](https://xichil.dev/docs/settings-saver/v1/guides/merging/index.md) |
| `build()` | Returns the immutable `ModSettings`. Needs at least one file or directory. | |

A null format means `WHOLE_FILE`. The builder can be reused after `build()`; later changes don't affect
what was built.

## SettingsFileFormat

| Member | Meaning |
| --- | --- |
| `Map<String, String> read(Reader reader) throws IOException` | The file's settings, in file order. Don't close the reader. |
| `void write(Map<String, String> values, Writer writer) throws IOException` | A complete file holding exactly `values`. Don't close the writer. |

Guide: [Write your own file format](https://xichil.dev/docs/settings-saver/v1/guides/custom-format/index.md).

## SettingsFileFormats

| Constant | File looks like | Synced |
| --- | --- | --- |
| `WHOLE_FILE` | any text | as a whole; the newest save wins |
| `PROPERTIES` | `key=value` lines, `#` comments | key by key; comments are dropped |
| `KEY_VALUE` | `key:value` lines, like `options.txt` | key by key |
| `WHOLE_FILE_KEY` | | the string `"content"`, the single key of a `WHOLE_FILE` file |

Guide: [Choose a file format](https://xichil.dev/docs/settings-saver/v1/guides/choosing-a-format/index.md).

## SettingsFix

| Member | Meaning |
| --- | --- |
| `void upgrade(String file, Map<String, String> settings)` | Converts from the format before the fix's version to the format of that version, in place. |
| `default void downgrade(String file, Map<String, String> settings)` | The reverse. Does nothing unless overridden. |
| `static SettingsFix renameKey(String from, String to)` | A ready-made fix that renames a key, in both directions. |

Guides: [mod versions](https://xichil.dev/docs/settings-saver/v1/guides/mod-version-fixes/index.md), [Minecraft versions](https://xichil.dev/docs/settings-saver/v1/guides/minecraft-fixes/index.md).

## SettingsMerger

| Member | Meaning |
| --- | --- |
| `void merge(String file, Map<String, String> stored, Map<String, String> changed)` | Merge `changed` into `stored`, in place. The default is `stored.putAll(changed)`. |

Guide: [Merge dependent settings](https://xichil.dev/docs/settings-saver/v1/guides/merging/index.md).

## Limits and fixed names

| | |
| --- | --- |
| Mod id length | at most 64 characters |
| Reserved mod ids | `vanilla`, `settingssaver` |
| Reserved path | `module.txt` |
| Files per registered directory | 256; more are cut off with a warning |
| Ignored in directories | files ending in `.tmp` |
| Encoding | UTF-8 text |
| Side | client only |
| Java level | 8 |

## Related

- [How syncing works](https://xichil.dev/docs/settings-saver/v1/concepts/how-syncing-works/index.md)
- [An optional dependency](https://xichil.dev/docs/settings-saver/v1/concepts/optional-dependency/index.md#api-stability): what "v1" promises.
