#765 Replace Utils usages with TeleportService + misc householding

- Remove some legacy settings
- Move Utils "addNormal" method to AuthGroupHandler

(Reapplied changes from orphaned fe29089)
This commit is contained in:
ljacqu
2016-07-03 19:53:44 +02:00
parent 7ea0763966
commit 7788ad6230
13 changed files with 78 additions and 64 deletions
@@ -14,7 +14,7 @@ import fr.xephi.authme.settings.Settings;
import fr.xephi.authme.settings.properties.RegistrationSettings;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import fr.xephi.authme.task.LimboPlayerTaskManager;
import fr.xephi.authme.util.Utils;
import fr.xephi.authme.util.TeleportationService;
import org.bukkit.entity.Player;
import org.bukkit.potion.PotionEffect;
import org.bukkit.potion.PotionEffectType;
@@ -43,6 +43,9 @@ public class AsynchronousUnregister implements AsynchronousProcess {
@Inject
private LimboPlayerTaskManager limboPlayerTaskManager;
@Inject
private TeleportationService teleportationService;
AsynchronousUnregister() { }
@@ -56,7 +59,7 @@ public class AsynchronousUnregister implements AsynchronousProcess {
}
if (service.getProperty(RegistrationSettings.FORCE)) {
Utils.teleportToSpawn(player);
teleportationService.teleportOnJoin(player);
player.saveData();
playerCache.removePlayer(player.getName().toLowerCase());
if (!Settings.getRegisteredGroup.isEmpty()) {