From 6549ebbf5ee3d31dc5be4f82247f1fbabc650fea Mon Sep 17 00:00:00 2001 From: Gabriele C Date: Fri, 3 Jun 2016 01:18:54 +0200 Subject: [PATCH] Should fix #731 --- .../java/fr/xephi/authme/hooks/BungeeCordMessage.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java index 26d5847ae..22a7ae087 100644 --- a/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java +++ b/src/main/java/fr/xephi/authme/hooks/BungeeCordMessage.java @@ -2,6 +2,8 @@ package fr.xephi.authme.hooks; import com.google.common.io.ByteArrayDataInput; import com.google.common.io.ByteStreams; + +import fr.xephi.authme.AuthMe; import fr.xephi.authme.ConsoleLogger; import fr.xephi.authme.cache.auth.PlayerAuth; import fr.xephi.authme.cache.auth.PlayerCache; @@ -25,6 +27,9 @@ public class BungeeCordMessage implements PluginMessageListener { @Inject private PlayerCache playerCache; + @Inject + private AuthMe plugin; + BungeeCordMessage() { } @@ -50,6 +55,12 @@ public class BungeeCordMessage implements PluginMessageListener { if ("login".equals(act)) { playerCache.updatePlayer(auth); 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() + " has logged in from one of your server!"); } else if ("logout".equals(act)) {