#930 Add specific message for register captcha success

This commit is contained in:
ljacqu
2018-01-06 20:01:45 +01:00
parent 9afd8679e9
commit ea87075cd2
33 changed files with 86 additions and 25 deletions
@@ -74,7 +74,7 @@ public class CaptchaCommand extends PlayerCommand {
private void checkRegisterCaptcha(Player player, String captchaCode) {
final boolean isCorrectCode = registrationCaptchaManager.checkCode(player, captchaCode);
if (isCorrectCode) {
commonService.send(player, MessageKey.CAPTCHA_SUCCESS);
commonService.send(player, MessageKey.REGISTER_CAPTCHA_SUCCESS);
commonService.send(player, MessageKey.REGISTER_MESSAGE);
} else {
String newCode = registrationCaptchaManager.getCaptchaCodeOrGenerateNew(player.getName());
@@ -137,6 +137,9 @@ public enum MessageKey {
/** To register you have to solve a captcha code first, please use the command: /captcha <theCaptcha> */
CAPTCHA_FOR_REGISTRATION_REQUIRED("captcha_for_registration", "<theCaptcha>"),
/** Valid captcha! You may now register with /register */
REGISTER_CAPTCHA_SUCCESS("register_captcha_valid"),
/** A VIP player has joined the server when it was full! */
KICK_FOR_VIP("kick_forvip"),