Adding to file menu

Create a Configurer to hold your preference. You could use a String configurer if you take care of serializing/unserializing the list of path names, but a StringArrayConfigurer probably makes more sense. This configurer will never be displayed anywhere, but Prefs only work via Configurers, we just use it to hold and encode/decode the value

final String[] mruFiles = new String[0];
final StringArrayConfigurer mruList = new StringArrayConfigurer("MRU_LIST", "", mruFiles );

Find the local module prefs

final Prefs prefs = GameModule.getGameModule().getPrefs()

Add our configurer to the prefs, but don’t specify a Tab name. This creates the invisible ‘headless’ pref. I

prefs.addoption("", mruList);

If no preference existed before, this creates a new preference name "“MRU_LIST” with no values. If the preference already exists, then the configurer is loaded with the value.

You can now read and write the preference value:

final String[] currentValues = prefs.getValue("MRU_LIST");
final String[2] newValues = new String[] {"a", "b");
prefs.setValue("MRU_LIST", newValues);

The StringArrayConfigurer we attached to the preferences takes care of converting between the array of strings and a singled string that is stored in the prefs file. There is no StringListConfigurer sorry, you will need to covert between Lists and Arrays.