From 7568453cde380e670d9b913a44d820ebc082c670 Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Tue, 12 Jul 2016 22:14:33 +0200 Subject: [PATCH] Don't remove session twice --- .../fr/xephi/authme/process/logout/AsynchronousLogout.java | 2 +- .../authme/process/logout/ProcessSynchronousPlayerLogout.java | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main/java/fr/xephi/authme/process/logout/AsynchronousLogout.java b/src/main/java/fr/xephi/authme/process/logout/AsynchronousLogout.java index c24d083b4..1ed261eae 100644 --- a/src/main/java/fr/xephi/authme/process/logout/AsynchronousLogout.java +++ b/src/main/java/fr/xephi/authme/process/logout/AsynchronousLogout.java @@ -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); } diff --git a/src/main/java/fr/xephi/authme/process/logout/ProcessSynchronousPlayerLogout.java b/src/main/java/fr/xephi/authme/process/logout/ProcessSynchronousPlayerLogout.java index ae7afe466..acbd04250 100644 --- a/src/main/java/fr/xephi/authme/process/logout/ProcessSynchronousPlayerLogout.java +++ b/src/main/java/fr/xephi/authme/process/logout/ProcessSynchronousPlayerLogout.java @@ -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); }