#723 Let LimboPlayer task manager decide which message key to use

- Pass boolean (is registered) value and determine internally which message key (email registration vs. regular) to use in the message task
This commit is contained in:
ljacqu
2016-06-15 20:37:00 +02:00
parent 5cbb83e153
commit 15886fb517
9 changed files with 37 additions and 36 deletions
@@ -195,16 +195,7 @@ public class AsynchronousJoin implements AsynchronousProcess {
// Timeout and message task
limboPlayerTaskManager.registerTimeoutTask(player);
MessageKey msg;
if (isAuthAvailable) {
msg = MessageKey.LOGIN_MESSAGE;
} else {
msg = service.getProperty(RegistrationSettings.USE_EMAIL_REGISTRATION)
? MessageKey.REGISTER_EMAIL_MESSAGE
: MessageKey.REGISTER_MESSAGE;
}
limboPlayerTaskManager.registerMessageTask(name, msg);
limboPlayerTaskManager.registerMessageTask(name, isAuthAvailable);
}
private boolean isPlayerUnrestricted(String name) {