#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
@@ -13,6 +13,7 @@ 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.BukkitService;
import fr.xephi.authme.util.TeleportationService;
import fr.xephi.authme.util.Utils;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
@@ -50,6 +51,9 @@ public class UnregisterAdminCommand implements ExecutableCommand {
@Inject
private AuthGroupHandler authGroupHandler;
@Inject
private TeleportationService teleportationService;
@Override
public void executeCommand(final CommandSender sender, List<String> arguments) {
@@ -93,8 +97,7 @@ public class UnregisterAdminCommand implements ExecutableCommand {
* @param target the player that was unregistered
*/
private void applyUnregisteredEffectsAndTasks(Player target) {
// TODO #765: Remove use of Utils method and behave according to settings
Utils.teleportToSpawn(target);
teleportationService.teleportOnJoin(target);
limboCache.addLimboPlayer(target);
limboPlayerTaskManager.registerTimeoutTask(target);