#761 Restore permission group in sync with limbo players

- Couple AuthGroupHandler closer to the LimboService: whenever a limbo player is restored, the auth group should be restored as well. This fixes some consistency issues.
- Move AuthGroupHandler into limbo package and make it package-private
- Change permission handler to skip any empty groups (prevents odd command output e.g. for BukkitPermissions)
This commit is contained in:
ljacqu
2017-04-29 22:37:34 +02:00
parent d4c1370da6
commit e0e4cd112d
15 changed files with 47 additions and 104 deletions
@@ -3,7 +3,6 @@ package fr.xephi.authme.process.register;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.data.limbo.LimboService;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.permission.AuthGroupType;
import fr.xephi.authme.process.SynchronousProcess;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.util.PlayerUtils;
@@ -24,9 +23,7 @@ public class ProcessSyncEmailRegister implements SynchronousProcess {
}
public void processEmailRegister(Player player) {
service.setGroup(player, AuthGroupType.REGISTERED_UNAUTHENTICATED);
service.send(player, MessageKey.ACCOUNT_NOT_ACTIVATED);
limboService.replaceTasksAfterRegistration(player);
player.saveData();