#1102 commands.yml file should not have any commands by default

This commit is contained in:
ljacqu
2017-02-20 21:11:57 +01:00
parent 39395836b4
commit 57ca81f2ba
3 changed files with 8 additions and 14 deletions
+3 -4
View File
@@ -20,7 +20,6 @@
# executor: CONSOLE
#
# Supported command events: onLogin, onJoin, onRegister
onLogin:
welcome:
command: 'msg %p Welcome back!'
executor: 'PLAYER'
onJoin: {}
onLogin: {}
onRegister: {}
@@ -2,11 +2,8 @@ package tools.filegeneration;
import ch.jalu.configme.SettingsManager;
import ch.jalu.configme.resource.YamlFileResource;
import com.google.common.collect.ImmutableMap;
import fr.xephi.authme.settings.commandconfig.Command;
import fr.xephi.authme.settings.commandconfig.CommandConfig;
import fr.xephi.authme.settings.commandconfig.CommandSettingsHolder;
import fr.xephi.authme.settings.commandconfig.Executor;
import tools.utils.AutoToolTask;
import tools.utils.ToolsConstants;
@@ -23,10 +20,8 @@ public class GenerateCommandsYml implements AutoToolTask {
public void executeDefault() {
File file = new File(COMMANDS_YML_FILE);
// Get default and add sample entry
// Get the default
CommandConfig commandConfig = CommandSettingsHolder.COMMANDS.getDefaultValue();
commandConfig.setOnLogin(
ImmutableMap.of("welcome", new Command("msg %p Welcome back!", Executor.PLAYER)));
// Export the value to the file
SettingsManager settingsManager = new SettingsManager(