Refactor message handlers into injectable components (preparation for #1467)

This commit is contained in:
ljacqu
2018-01-21 20:47:29 +01:00
parent 847991b658
commit 610a699c95
13 changed files with 317 additions and 433 deletions
@@ -49,7 +49,7 @@ public class MessagesCommand implements ExecutableCommand {
try {
helpTranslationGenerator.updateHelpFile();
sender.sendMessage("Successfully updated the help file");
helpMessagesService.reload();
helpMessagesService.reloadMessagesFile();
} catch (IOException e) {
sender.sendMessage("Could not update help file: " + e.getMessage());
ConsoleLogger.logException("Could not update help file:", e);
@@ -65,7 +65,7 @@ public class MessagesCommand implements ExecutableCommand {
getMessagePath(DEFAULT_LANGUAGE))
.executeCopy(sender);
if (isFileUpdated) {
messages.reload();
messages.reloadMessagesFile();
}
} catch (Exception e) {
sender.sendMessage("Could not update messages: " + e.getMessage());