Fix registered players being teleported to first spawn, fix player losing his speed

This commit is contained in:
ljacqu
2016-07-04 21:38:23 +02:00
parent 2867ebaddd
commit ea6603a6dc
3 changed files with 14 additions and 25 deletions
@@ -2,8 +2,6 @@ package fr.xephi.authme.process.quit;
import fr.xephi.authme.cache.backup.PlayerDataStorage;
import fr.xephi.authme.cache.limbo.LimboCache;
import fr.xephi.authme.permission.AuthGroupHandler;
import fr.xephi.authme.process.ProcessService;
import fr.xephi.authme.process.SynchronousProcess;
import org.bukkit.entity.Player;
@@ -15,17 +13,12 @@ public class ProcessSyncronousPlayerQuit implements SynchronousProcess {
@Inject
private PlayerDataStorage playerDataStorage;
@Inject
private ProcessService service;
@Inject
private LimboCache limboCache;
@Inject
private AuthGroupHandler authGroupHandler;
public void processSyncQuit(Player player) {
if (limboCache.hasPlayerData(player.getName().toLowerCase())) { // it mean player is not authenticated
if (limboCache.hasPlayerData(player.getName())) { // it mean player is not authenticated
limboCache.restoreData(player);
limboCache.removeFromCache(player);
} else {
// Save player's data, so we could retrieve it later on player next join