Use injection in and for LimboCache, migrate some legacy settings, remove setGroup from Utils
- New injector method allows to retrieve services if they've already been instantiated -> useful for onDisable() which might be run after aborted initialization - Deprecate various methods that need to be removed
This commit is contained in:
@@ -5,12 +5,12 @@ import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
import fr.xephi.authme.output.MessageKey;
|
||||
import fr.xephi.authme.permission.AuthGroupType;
|
||||
import fr.xephi.authme.process.AsynchronousProcess;
|
||||
import fr.xephi.authme.process.ProcessService;
|
||||
import fr.xephi.authme.process.SyncProcessManager;
|
||||
import fr.xephi.authme.util.BukkitService;
|
||||
import fr.xephi.authme.util.Utils;
|
||||
import fr.xephi.authme.util.Utils.GroupType;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@@ -63,7 +63,7 @@ public class AsynchronousLogout implements AsynchronousProcess {
|
||||
limboCache.deleteLimboPlayer(name);
|
||||
}
|
||||
limboCache.addLimboPlayer(player);
|
||||
Utils.setGroup(player, GroupType.NOTLOGGEDIN);
|
||||
service.setGroup(player, AuthGroupType.NOT_LOGGED_IN);
|
||||
syncProcessManager.processSyncPlayerLogout(player);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user