#450 Move Settings#isEmailCorrect to Utils class
This commit is contained in:
@@ -5,7 +5,7 @@ import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.command.CommandService;
|
||||
import fr.xephi.authme.command.ExecutableCommand;
|
||||
import fr.xephi.authme.output.MessageKey;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.util.Utils;
|
||||
import org.bukkit.command.CommandSender;
|
||||
|
||||
import java.util.List;
|
||||
@@ -20,7 +20,7 @@ public class SetEmailCommand implements ExecutableCommand {
|
||||
final String playerEmail = arguments.get(1);
|
||||
|
||||
// Validate the email address
|
||||
if (!Settings.isEmailCorrect(playerEmail)) {
|
||||
if (!Utils.isEmailCorrect(playerEmail, commandService.getSettings())) {
|
||||
commandService.send(sender, MessageKey.INVALID_EMAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import fr.xephi.authme.output.MessageKey;
|
||||
import fr.xephi.authme.process.Management;
|
||||
import fr.xephi.authme.security.RandomString;
|
||||
import fr.xephi.authme.settings.Settings;
|
||||
import fr.xephi.authme.util.Utils;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.List;
|
||||
@@ -26,7 +27,7 @@ public class RegisterCommand extends PlayerCommand {
|
||||
return;
|
||||
}
|
||||
final String email = arguments.get(0);
|
||||
if (!Settings.isEmailCorrect(email)) {
|
||||
if (!Utils.isEmailCorrect(email, commandService.getSettings())) {
|
||||
commandService.send(player, MessageKey.INVALID_EMAIL);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user