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.

Last updated

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#

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:

  1. Is Settings Saver running? Search the log for [Settings Saver] Starting on. On a dedicated server it logs Dedicated server detected; nothing to do.: nothing syncs there.
  2. 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
  1. 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.
  2. 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.
  3. Is the API bundled in your jar? If your jar contains dev/xichil/settingssaver/api/ classes, remove them: the dependency must be compileOnly.
  4. Registering from code? Check that the "is installed" check uses the id settingssaver and that the call is reached.

3. Registered, but nothing is saved#

4. Saved, but a new instance doesn't get the file#

5. Settings change on their own, or keep coming back#

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#