#762 - Move all sessions stuff to new SessionManager class
This commit is contained in:
@@ -5,6 +5,7 @@ import com.google.common.io.ByteStreams;
|
||||
|
||||
import fr.xephi.authme.AuthMe;
|
||||
import fr.xephi.authme.ConsoleLogger;
|
||||
import fr.xephi.authme.cache.SessionManager;
|
||||
import fr.xephi.authme.cache.auth.PlayerAuth;
|
||||
import fr.xephi.authme.cache.auth.PlayerCache;
|
||||
import fr.xephi.authme.datasource.DataSource;
|
||||
@@ -29,6 +30,9 @@ public class BungeeCordMessage implements PluginMessageListener {
|
||||
@Inject
|
||||
private PlayerCache playerCache;
|
||||
|
||||
@Inject
|
||||
private SessionManager sessionManager;
|
||||
|
||||
@Inject
|
||||
private AuthMe plugin;
|
||||
|
||||
@@ -61,9 +65,8 @@ public class BungeeCordMessage implements PluginMessageListener {
|
||||
playerCache.updatePlayer(auth);
|
||||
dataSource.setLogged(name);
|
||||
//START 03062016 sgdc3: should fix #731 but we need to recode this mess
|
||||
if (plugin.getSessions().containsKey(name)) {
|
||||
plugin.getSessions().get(name).cancel();
|
||||
plugin.getSessions().remove(name);
|
||||
if (sessionManager.hasSession(name)) {
|
||||
sessionManager.cancelSession(name);
|
||||
}
|
||||
//END
|
||||
|
||||
|
||||
Reference in New Issue
Block a user