This commit is contained in:
Gabriele C
2017-11-02 11:24:17 +01:00
parent 6505538240
commit 273c318e96
22 changed files with 105 additions and 118 deletions
@@ -7,9 +7,10 @@ import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.message.MessageKey;
import fr.xephi.authme.process.AsynchronousProcess;
import fr.xephi.authme.process.SyncProcessManager;
import fr.xephi.authme.service.BungeeService;
import fr.xephi.authme.service.bungeecord.BungeeService;
import fr.xephi.authme.service.CommonService;
import fr.xephi.authme.service.SessionService;
import fr.xephi.authme.service.bungeecord.MessageType;
import fr.xephi.authme.settings.properties.RestrictionSettings;
import org.bukkit.entity.Player;
@@ -58,18 +59,18 @@ public class AsynchronousLogout implements AsynchronousProcess {
PlayerAuth auth = playerCache.getAuth(name);
database.updateSession(auth);
bungeeService.sendRefreshSession(name);
bungeeService.sendAuthMeBungeecordMessage(MessageType.REFRESH_SESSION, name);
if (service.getProperty(RestrictionSettings.SAVE_QUIT_LOCATION)) {
auth.setQuitLocation(player.getLocation());
database.updateQuitLoc(auth);
bungeeService.sendRefreshQuitLoc(name);
bungeeService.sendAuthMeBungeecordMessage(MessageType.REFRESH_QUITLOC, name);
}
playerCache.removePlayer(name);
codeManager.unverify(name);
database.setUnlogged(name);
sessionService.revokeSession(name);
bungeeService.sendLogout(name);
bungeeService.sendAuthMeBungeecordMessage(MessageType.LOGOUT, name);
syncProcessManager.processSyncPlayerLogout(player);
}
}