#427 Define registration type with two options - one configuring the 2nd argument
- Split sole setting to two: one defining the registration type, and one defining what the register command should take as second argument - Contains ugly code that will be fixed with a later issue
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
package fr.xephi.authme.process.email;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.data.auth.PlayerAuth;
|
||||
import fr.xephi.authme.data.auth.PlayerCache;
|
||||
@@ -13,6 +9,10 @@ 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.util.Utils;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/**
|
||||
* Async task to add an email to an account.
|
||||
@@ -65,7 +65,10 @@ public class AsyncAddEmail implements AsynchronousProcess {
|
||||
if (dataSource.isAuthAvailable(player.getName())) {
|
||||
service.send(player, MessageKey.LOGIN_MESSAGE);
|
||||
} else {
|
||||
service.send(player, service.getProperty(RegistrationSettings.REGISTRATION_TYPE).getMessageKey());
|
||||
MessageKey registerMessage = Utils.getRegisterMessage(
|
||||
service.getProperty(RegistrationSettings.REGISTRATION_TYPE),
|
||||
service.getProperty(RegistrationSettings.REGISTER_SECOND_ARGUMENT));
|
||||
service.send(player, registerMessage);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user