Fix an integration that doesn't sync
Read Settings Saver's log lines to find out why your mod's settings were not registered, saved or restored, with the cause and fix for each message.
Steps
Settings Saver never lets a mod's integration break the game: it logs the problem and carries on. So when something doesn't sync, the log says why. This guide lists what to look for.
Prerequisites#
- An instance with your mod and Settings Saver, and its game log.
Every line Settings Saver writes starts with [Settings Saver]. Warnings continue with WARN, errors
with ERROR.
Steps#
1. Look for the registration line#
[Settings Saver] Registered My Mod (mymod 2.1.0): [config/mymod.properties], not saved unless turned on in a profile
| You see | Go to |
|---|---|
the line, ending in not saved unless turned on in a profile |
step 3 |
the line, ending in saved by default |
step 4 |
no line, but a WARN or ERROR naming your mod |
step 2 |
| nothing about your mod at all | No line at all |
2. A warning or error instead#
| Log message | Cause | Fix |
|---|---|---|
mymod: already registered; ignoring the second registration. |
Two registrations used the mod id mymod: two plugin classes, a plugin plus a call from code, or another mod with your id. |
Register once. |
mymod: 'config/x' is already synced by <owner>; ignoring this mod's registration. |
One of your paths is, contains or lies inside a path that <owner> syncs. <owner> is another mod's id, or vanilla for Minecraft's own files. |
Register a narrower path, such as your own folder. Your whole registration was ignored, not just that path. |
mymod: 'module.txt' can't be registered (the store uses that name); ignoring this mod's registration. |
A path is exactly module.txt. |
Rename the file or move it into a folder. |
mymod: unknown Minecraft release '<id>' for a fix; skipping that fix (register it by DataVersion). |
minecraftFix("<id>", …) names a release this Settings Saver build doesn't know. Only that fix is skipped. |
Use minecraftFix(int, …) with the DataVersion. |
A mod registered no settings (null); ignoring it. |
register(null). |
Pass the built ModSettings. |
Mod integration <class> failed; its settings are not synced. with a stack trace |
Your plugin's register threw. Usually an IllegalArgumentException from the builder: a bad mod id, path or pattern. |
Read the exception message; it says what is wrong. |
Skipping a mod integration that can't be loaded (…) |
The class named in the service file can't be created: wrong name, not public, no public no-argument constructor, or it references a class that isn't there. | Fix the name in the service file, or the class. |
mymod: more than 256 files in <dir>; syncing only the first ones. |
A registered directory is too large. | Register only the folder that holds settings. |
The builder's own messages, which arrive inside the Mod integration … failed error:
| Exception message | Cause |
|---|---|
Invalid mod id 'MyMod': use lower case letters, digits, '_', '.' and '-' |
The id must start with a lower case letter or digit and be at most 64 characters. |
The mod id 'vanilla' is reserved |
vanilla and settingssaver can't be used. |
Invalid path '…': it must be relative to the game directory and stay inside it |
Absolute, contains : or .., or is empty. |
mymod: '…' is registered twice |
The same path was added twice. |
mymod: register at least one file or directory |
build() without file or directory. |
Exclusion patterns can't contain ',' |
Split the pattern into several arguments. |
No display name given, No mod version given, No path given, No version given, No fix given |
A null or blank argument. |
Invalid DataVersion 0 |
minecraftFix(int, …) needs a positive number. |
No line at all#
Settings Saver never saw your plugin. Check, in this order:
- Is Settings Saver running? Search the log for
[Settings Saver] Starting on. On a dedicated server it logsDedicated server detected; nothing to do.: nothing syncs there. - Is the service file in the jar? It must be at exactly
META-INF/services/dev.xichil.settingssaver.api.v1.SettingsSaverPlugin:
unzip -l mymod-2.1.0.jar | grep META-INF/services
- Does it contain the right name? The fully qualified class name, one per line, such as
com.example.mymod.compat.MyModSettingsSaver. No.class, no.java. - Did your build rename it? Tools that shade or relocate packages can rewrite service files. The file name must still be the API's interface name, and its content your class's real name in the jar.
- Is the API bundled in your jar? If your jar contains
dev/xichil/settingssaver/api/classes, remove them: the dependency must becompileOnly. - Registering from code? Check that the "is installed" check uses the id
settingssaverand that the call is reached.
3. Registered, but nothing is saved#
- The mod is off for the profile. Without
.savedByDefault(true), nothing is saved until the profile hasenabled.mymod=truein itsprofile.properties. See Set what is saved by default. - Sync is Off and nobody pressed Save. In the default sync mode, settings reach the profile only through Save settings to profile.
- The file doesn't exist yet. Until your mod writes it, there is nothing to save.
- The keys are excluded. Check
exclude.mymod=inprofile.propertiesand yourexcludedByDefaultpatterns. - Your format throws while reading. The file is skipped and the error logged until it can be read.
4. Saved, but a new instance doesn't get the file#
- The instance already had the file. A file is filled in only when it is missing. If your mod creates its default config before the restore, the profile's copy is not applied. See Read your config after the restore.
- The one-time apply is used up. With sync Off, an instance gets the profile once, on its first launch with Settings Saver. After that, press Load settings from profile.
- The instance uses another profile. Each instance picks its own profile.
- Your mod read the file too early. The file is correct on disk but your mod loaded defaults before it was written. See Read your config after the restore.
5. Settings change on their own, or keep coming back#
- Your format doesn't round-trip. If reading what
writewrote gives a different map, Settings Saver sees changes nobody made and saves them. Test the round trip. - A fix converts already-converted values. See Newer and older versions together.
- The mod version is stale. If the version passed to the builder doesn't match the running mod, fixes run at the wrong time.
6. Fixes or merger errors while syncing#
| Log message | Meaning |
|---|---|
mymod fix at mod 2.0.0: upgrading config/mymod.properties failed. |
That fix threw. It was skipped for this conversion; the other fixes ran. |
mymod fix at DataVersion 1519: downgrading config/mymod.properties failed. |
The same, for a Minecraft fix. |
mymod: the mod's merge of config/mymod.properties failed; keeping every change as is. |
Your merger threw. The default merge was used, so no change was lost. |
Each comes with the stack trace of your exception.
Look at the store#
The saved files are plain text. Open the store folder (the [Settings Saver] Starting on line names it)
and read them:
profiles/default/profile.properties enabled.mymod=, exclude.mymod=
profiles/default/mymod/module.txt the mod version and DataVersion the settings were saved in
profiles/default/mymod/config/mymod.properties
Where your settings are stored in the wiki gives the store's location per operating system.
Next steps#
- Threads and errors: what Settings Saver does when your code throws.
- How syncing works