* #1026 Add more tags for forced commands (lazily replaced) - Extract lazy replacement of tags to its own class - Implement wrapper to replace a String property within an object - Use wrapper in command manager and add new tags * Make argument type generic in lazy tags util
This commit is contained in:
@@ -26,7 +26,7 @@ public class GenerateCommandsYml implements AutoToolTask {
|
||||
// Get default and add sample entry
|
||||
CommandConfig commandConfig = CommandSettingsHolder.COMMANDS.getDefaultValue();
|
||||
commandConfig.setOnLogin(
|
||||
ImmutableMap.of("welcome", newCommand("msg %p Welcome back!", Executor.PLAYER)));
|
||||
ImmutableMap.of("welcome", new Command("msg %p Welcome back!", Executor.PLAYER)));
|
||||
|
||||
// Export the value to the file
|
||||
SettingsManager settingsManager = new SettingsManager(
|
||||
@@ -41,11 +41,4 @@ public class GenerateCommandsYml implements AutoToolTask {
|
||||
public String getTaskName() {
|
||||
return "generateCommandsYml";
|
||||
}
|
||||
|
||||
private static Command newCommand(String commandLine, Executor executor) {
|
||||
Command command = new Command();
|
||||
command.setCommand(commandLine);
|
||||
command.setExecutor(executor);
|
||||
return command;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user