Add a debug message #831

This commit is contained in:
Gabriele C 2016-08-02 19:07:54 +02:00
parent fbabeb9261
commit bff99902b0
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package fr.xephi.authme.listener;
import fr.xephi.authme.AntiBot;
import fr.xephi.authme.ConsoleLogger;
import fr.xephi.authme.cache.auth.PlayerAuth;
import fr.xephi.authme.datasource.DataSource;
import fr.xephi.authme.output.MessageKey;
@ -217,6 +218,7 @@ public class AuthMePlayerListener implements Listener {
try {
onJoinVerifier.checkSingleSession(name);
} catch (FailedVerificationException e) {
ConsoleLogger.warning("DEBUG: " + name + " tried to join the game but an user with the same name was already online!" );
event.setKickMessage(m.retrieveSingle(e.getReason(), e.getArgs()));
event.setResult(PlayerLoginEvent.Result.KICK_OTHER);
return;

View File

@ -28,7 +28,7 @@ public final class ListenerConsistencyTest {
"AuthMePlayerListener#onPreLogin", "AuthMePlayerListener#onPlayerLogin",
"AuthMePlayerListener#onPlayerQuit", "AuthMeServerListener#onPluginDisable",
"AuthMeServerListener#onServerPing", "AuthMeServerListener#onPluginEnable",
"AuthMePlayerListener#onJoinMessage");
"AuthMePlayerListener#onJoinMessage", "AuthMePlayerListener#onLoginSingleSession");
@Test
public void shouldSetIgnoreCancelledToTrue() {