Fix #349 Create method on Messages to pass tag replacements

- Add tests
- Fix placeholder in some files
This commit is contained in:
ljacqu
2015-12-16 20:46:40 +01:00
parent 558a1240a6
commit dcc365c22f
7 changed files with 88 additions and 24 deletions
@@ -58,9 +58,7 @@ public class CaptchaCommand extends ExecutableCommand {
plugin.cap.remove(playerNameLowerCase);
String randStr = new RandomString(Settings.captchaLength).nextString();
plugin.cap.put(playerNameLowerCase, randStr);
for (String s : m.retrieve(MessageKey.CAPTCHA_WRONG_ERROR)) {
player.sendMessage(s.replace("THE_CAPTCHA", plugin.cap.get(playerNameLowerCase)));
}
m.send(player, MessageKey.CAPTCHA_WRONG_ERROR, plugin.cap.get(playerNameLowerCase));
return true;
}