Revert code changes to single session
This commit is contained in:
parent
4a41f51384
commit
42c3dcbbcb
@ -1,6 +1,5 @@
|
|||||||
package fr.xephi.authme.process.logout;
|
package fr.xephi.authme.process.logout;
|
||||||
|
|
||||||
import fr.xephi.authme.cache.SessionManager;
|
|
||||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||||
import fr.xephi.authme.cache.limbo.LimboCache;
|
import fr.xephi.authme.cache.limbo.LimboCache;
|
||||||
@ -9,7 +8,6 @@ import fr.xephi.authme.output.MessageKey;
|
|||||||
import fr.xephi.authme.process.AsynchronousProcess;
|
import fr.xephi.authme.process.AsynchronousProcess;
|
||||||
import fr.xephi.authme.process.ProcessService;
|
import fr.xephi.authme.process.ProcessService;
|
||||||
import fr.xephi.authme.process.SyncProcessManager;
|
import fr.xephi.authme.process.SyncProcessManager;
|
||||||
import fr.xephi.authme.settings.properties.PluginSettings;
|
|
||||||
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
import fr.xephi.authme.settings.properties.RestrictionSettings;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@ -29,9 +27,6 @@ public class AsynchronousLogout implements AsynchronousProcess {
|
|||||||
@Inject
|
@Inject
|
||||||
private LimboCache limboCache;
|
private LimboCache limboCache;
|
||||||
|
|
||||||
@Inject
|
|
||||||
private SessionManager sessionManager;
|
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
private SyncProcessManager syncProcessManager;
|
private SyncProcessManager syncProcessManager;
|
||||||
|
|
||||||
@ -52,11 +47,6 @@ public class AsynchronousLogout implements AsynchronousProcess {
|
|||||||
database.updateQuitLoc(auth);
|
database.updateQuitLoc(auth);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sessionManager.hasSession(name) || (service.getProperty(PluginSettings.SESSIONS_ENABLED) && database.isLogged(name))) {
|
|
||||||
sessionManager.cancelSession(name);
|
|
||||||
service.send(player, MessageKey.SESSION_EXPIRED);
|
|
||||||
}
|
|
||||||
|
|
||||||
limboCache.addPlayerData(player);
|
limboCache.addPlayerData(player);
|
||||||
playerCache.removePlayer(name);
|
playerCache.removePlayer(name);
|
||||||
database.setUnlogged(name);
|
database.setUnlogged(name);
|
||||||
|
|||||||
@ -51,6 +51,9 @@ public class ProcessSynchronousPlayerLogout implements SynchronousProcess {
|
|||||||
|
|
||||||
public void processSyncLogout(Player player) {
|
public void processSyncLogout(Player player) {
|
||||||
final String name = player.getName().toLowerCase();
|
final String name = player.getName().toLowerCase();
|
||||||
|
if (sessionManager.hasSession(name)) {
|
||||||
|
sessionManager.cancelSession(name);
|
||||||
|
}
|
||||||
if (service.getProperty(RestrictionSettings.PROTECT_INVENTORY_BEFORE_LOGIN)) {
|
if (service.getProperty(RestrictionSettings.PROTECT_INVENTORY_BEFORE_LOGIN)) {
|
||||||
protocolLibService.sendBlankInventoryPacket(player);
|
protocolLibService.sendBlankInventoryPacket(player);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user