Refactor sessions a bit to fix #419

This commit is contained in:
games647
2016-06-28 16:03:04 +02:00
parent 874869cef8
commit 469e8d3a48
3 changed files with 21 additions and 23 deletions
@@ -142,10 +142,9 @@ public class AsynchronousJoin implements AsynchronousProcess {
}
// Session logic
if (service.getProperty(PluginSettings.SESSIONS_ENABLED) && (playerCache.isAuthenticated(name) || database.isLogged(name))) {
if (sessionManager.hasSession(name)) {
sessionManager.cancelSession(name);
}
if (service.getProperty(PluginSettings.SESSIONS_ENABLED) && (sessionManager.hasSession(name) || database.isLogged(name))) {
sessionManager.cancelSession(name);
PlayerAuth auth = database.getAuth(name);
database.setUnlogged(name);
playerCache.removePlayer(name);