#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

View File

@ -241,8 +241,8 @@
<shadedPattern>fr.xephi.authme.libs.jalu.injector</shadedPattern>
</relocation>
<relocation>
<pattern>com.github.authme.configme</pattern>
<shadedPattern>fr.xephi.authme.libs.authme.configme</shadedPattern>
<pattern>ch.jalu.configme</pattern>
<shadedPattern>fr.xephi.authme.libs.jalu.configme</shadedPattern>
</relocation>
<relocation>
<pattern>com.zaxxer.hikari</pattern>
@ -892,7 +892,7 @@
<dependency>
<groupId>ch.jalu</groupId>
<artifactId>configme</artifactId>
<version>0.3</version>
<version>0.4</version>
<scope>compile</scope>
<optional>true</optional>
<exclusions>
@ -923,7 +923,7 @@
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
<version>2.4.1</version>
<version>2.7.9</version>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>

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: {}

View File

@ -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(