This commit is contained in:
Gabriele C 2016-06-03 01:18:54 +02:00
parent ca2e75651c
commit 6549ebbf5e

View File

@ -2,6 +2,8 @@ package fr.xephi.authme.hooks;
import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteArrayDataInput;
import com.google.common.io.ByteStreams; import com.google.common.io.ByteStreams;
import fr.xephi.authme.AuthMe;
import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.ConsoleLogger;
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;
@ -25,6 +27,9 @@ public class BungeeCordMessage implements PluginMessageListener {
@Inject @Inject
private PlayerCache playerCache; private PlayerCache playerCache;
@Inject
private AuthMe plugin;
BungeeCordMessage() { } BungeeCordMessage() { }
@ -50,6 +55,12 @@ public class BungeeCordMessage implements PluginMessageListener {
if ("login".equals(act)) { if ("login".equals(act)) {
playerCache.updatePlayer(auth); playerCache.updatePlayer(auth);
dataSource.setLogged(name); dataSource.setLogged(name);
//START 03062016 sgdc3: should fix #731 but we need to recode this mess
if (plugin.sessions.containsKey(name)) {
plugin.sessions.get(name).cancel();
plugin.sessions.remove(name);
}
//END
ConsoleLogger.info("Player " + auth.getNickname() ConsoleLogger.info("Player " + auth.getNickname()
+ " has logged in from one of your server!"); + " has logged in from one of your server!");
} else if ("logout".equals(act)) { } else if ("logout".equals(act)) {