Don't remove session twice

This commit is contained in:
Gabriele C 2016-07-12 22:14:33 +02:00
parent 09d6f5c923
commit 7568453cde
2 changed files with 1 additions and 4 deletions

View File

@ -52,7 +52,7 @@ public class AsynchronousLogout implements AsynchronousProcess {
database.updateQuitLoc(auth);
}
if (service.getProperty(PluginSettings.SESSIONS_ENABLED) && (sessionManager.hasSession(name) || database.isLogged(name))) {
if (sessionManager.hasSession(name) || (service.getProperty(PluginSettings.SESSIONS_ENABLED) && database.isLogged(name))) {
sessionManager.cancelSession(name);
service.send(player, MessageKey.SESSION_EXPIRED);
}

View File

@ -51,9 +51,6 @@ public class ProcessSynchronousPlayerLogout implements SynchronousProcess {
public void processSyncLogout(Player player) {
final String name = player.getName().toLowerCase();
if (sessionManager.hasSession(name)) {
sessionManager.cancelSession(name);
}
if (service.getProperty(RestrictionSettings.PROTECT_INVENTORY_BEFORE_LOGIN)) {
protocolLibService.sendBlankInventoryPacket(player);
}