#1113 Handle LimboPlayers within LimboService (remove LimboCache) (work in progress)

- Delete LimboCache and LimboPlayerStorage: LimboService now handles all LimboPlayer actions
- Revoke player rights when creating a LimboPlayer, within the LimboService
- Various fixes and improvements
This commit is contained in:
ljacqu
2017-03-05 21:47:46 +01:00
parent 22ccf582b8
commit 021497b9e6
16 changed files with 138 additions and 850 deletions
@@ -2,12 +2,11 @@ package fr.xephi.authme.process.logout;
import fr.xephi.authme.data.auth.PlayerAuth;
import fr.xephi.authme.data.auth.PlayerCache;
import fr.xephi.authme.data.limbo.LimboService;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.process.AsynchronousProcess;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.process.SyncProcessManager;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import org.bukkit.entity.Player;
@@ -24,9 +23,6 @@ public class AsynchronousLogout implements AsynchronousProcess {
@Inject
private PlayerCache playerCache;
@Inject
private LimboService limboService;
@Inject
private SyncProcessManager syncProcessManager;
@@ -47,8 +43,6 @@ public class AsynchronousLogout implements AsynchronousProcess {
database.updateQuitLoc(auth);
}
// TODO #1113: Would we not have to RESTORE the limbo player here?
limboService.createLimboPlayer(player);
playerCache.removePlayer(name);
database.setUnlogged(name);
syncProcessManager.processSyncPlayerLogout(player);