#427 Replace registration settings with one registration type property
- Merge "useEmail" / "usePasswordConfirmation" / "useEmailConfirmation" settings into enum property - Migrate old settings
This commit is contained in:
@@ -8,6 +8,7 @@ import fr.xephi.authme.process.AsynchronousProcess;
|
||||
import fr.xephi.authme.service.CommonService;
|
||||
import fr.xephi.authme.service.ValidationService;
|
||||
import fr.xephi.authme.settings.properties.RegistrationSettings;
|
||||
import fr.xephi.authme.settings.properties.RegistrationArgumentType.Execution;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -66,7 +67,7 @@ public class AsyncChangeEmail implements AsynchronousProcess {
|
||||
private void outputUnloggedMessage(Player player) {
|
||||
if (dataSource.isAuthAvailable(player.getName())) {
|
||||
service.send(player, MessageKey.LOGIN_MESSAGE);
|
||||
} else if (service.getProperty(RegistrationSettings.USE_EMAIL_REGISTRATION)) {
|
||||
} else if (service.getProperty(RegistrationSettings.REGISTRATION_TYPE).getExecution() == Execution.EMAIL) {
|
||||
service.send(player, MessageKey.REGISTER_EMAIL_MESSAGE);
|
||||
} else {
|
||||
service.send(player, MessageKey.REGISTER_MESSAGE);
|
||||
|
||||
Reference in New Issue
Block a user