Search in sources :

Example 1 with CommandConfig

use of fr.xephi.authme.settings.commandconfig.CommandConfig in project AuthMeReloaded by AuthMe.

the class GenerateCommandsYml method executeDefault.

@Override
public void executeDefault() {
    File file = new File(COMMANDS_YML_FILE);
    // Get the default
    CommandConfig commandConfig = CommandSettingsHolder.COMMANDS.getDefaultValue();
    // Export the value to the file
    SettingsManager settingsManager = new SettingsManager(new YamlFileResource(file), null, CommandSettingsHolder.class);
    settingsManager.setProperty(CommandSettingsHolder.COMMANDS, commandConfig);
    settingsManager.save();
    System.out.println("Updated " + COMMANDS_YML_FILE);
}
Also used : YamlFileResource(ch.jalu.configme.resource.YamlFileResource) CommandConfig(fr.xephi.authme.settings.commandconfig.CommandConfig) SettingsManager(ch.jalu.configme.SettingsManager) File(java.io.File)

Aggregations

SettingsManager (ch.jalu.configme.SettingsManager)1 YamlFileResource (ch.jalu.configme.resource.YamlFileResource)1 CommandConfig (fr.xephi.authme.settings.commandconfig.CommandConfig)1 File (java.io.File)1