#449 Migrate remaining non-group legacy Settings

This commit is contained in:
ljacqu
2016-07-23 14:44:52 +02:00
parent 476e0c197d
commit 18a9fbaa26
14 changed files with 119 additions and 127 deletions
@@ -18,9 +18,9 @@ import fr.xephi.authme.process.AsynchronousProcess;
import fr.xephi.authme.process.ProcessService;
import fr.xephi.authme.process.SyncProcessManager;
import fr.xephi.authme.security.PasswordSecurity;
import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.DatabaseSettings;
import fr.xephi.authme.settings.properties.EmailSettings;
import fr.xephi.authme.settings.properties.HooksSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.task.PlayerDataTaskManager;
import fr.xephi.authme.util.BukkitService;
@@ -94,7 +94,8 @@ public class AsynchronousLogin implements AsynchronousProcess {
return null;
}
if (!service.getProperty(DatabaseSettings.MYSQL_COL_GROUP).isEmpty() && pAuth.getGroupId() == Settings.getNonActivatedGroup) {
if (!service.getProperty(DatabaseSettings.MYSQL_COL_GROUP).isEmpty()
&& pAuth.getGroupId() == service.getProperty(HooksSettings.NON_ACTIVATED_USERS_GROUP)) {
service.send(player, MessageKey.ACCOUNT_NOT_ACTIVATED);
return null;
}
@@ -12,6 +12,7 @@ import fr.xephi.authme.process.SyncProcessManager;
import fr.xephi.authme.settings.SpawnLoader;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.util.Utils;
import fr.xephi.authme.util.ValidationService;
import org.bukkit.Location;
import org.bukkit.entity.Player;
@@ -40,12 +41,15 @@ public class AsynchronousQuit implements AsynchronousProcess {
@Inject
private SpawnLoader spawnLoader;
@Inject
private ValidationService validationService;
AsynchronousQuit() {
}
public void processQuit(Player player) {
if (player == null || Utils.isUnrestricted(player)) {
if (player == null || validationService.isUnrestricted(player.getName())) {
return;
}
final String name = player.getName().toLowerCase();