mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2025-02-01 20:41:28 +01:00
Ask player to change email if email already added.
This commit is contained in:
parent
6855fb93fc
commit
d6ab7d5da8
@ -97,6 +97,8 @@ public enum MessageKey {
|
||||
|
||||
USAGE_ADD_EMAIL("usage_email_add"),
|
||||
|
||||
USAGE_CHANGE_EMAIL("usage_email_change"),
|
||||
|
||||
USAGE_RECOVER_EMAIL("usage_email_recovery"),
|
||||
|
||||
INVALID_NEW_EMAIL("new_email_invalid"),
|
||||
|
@ -5,7 +5,6 @@ import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.output.MessageKey;
|
||||
import fr.xephi.authme.output.Messages;
|
||||
import fr.xephi.authme.permission.PlayerPermission;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.util.StringUtils;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -52,6 +51,11 @@ public class AsyncChangeEmail {
|
||||
m.send(player, MessageKey.INVALID_OLD_EMAIL);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!StringUtils.isEmpty(currentEmail) && !currentEmail.equals("your@email.com")) {
|
||||
m.send(player, MessageKey.USAGE_CHANGE_EMAIL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!Settings.isEmailCorrect(newEmail)) {
|
||||
m.send(player, MessageKey.INVALID_NEW_EMAIL);
|
||||
|
Loading…
Reference in New Issue
Block a user