#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
@@ -93,13 +93,12 @@ public class UnregisterAdminCommand implements ExecutableCommand {
* @param target the player that was unregistered
*/
private void applyUnregisteredEffectsAndTasks(Player target) {
// TODO ljacqu 20160612: Remove use of Utils method and behave according to settings
// TODO #765: Remove use of Utils method and behave according to settings
Utils.teleportToSpawn(target);
limboCache.addLimboPlayer(target);
limboPlayerTaskManager.registerTimeoutTask(target);
limboPlayerTaskManager.registerMessageTask(target.getName(),
MessageKey.REGISTER_MESSAGE);
limboPlayerTaskManager.registerMessageTask(target.getName(), false);
final int timeout = commandService.getProperty(RestrictionSettings.TIMEOUT) * TICKS_PER_SECOND;
if (commandService.getProperty(RegistrationSettings.APPLY_BLIND_EFFECT)) {