Prevent users from connecting many times under some circumstances.

This commit is contained in:
Sil3nt_One 2013-01-18 16:54:36 +05:30 committed by md_5
parent be6fedfa68
commit 12bf653bbc

View File

@ -59,6 +59,12 @@ public class InitialHandler implements Runnable
throw new KickException("Not authenticated with minecraft.net");
}
// Check for multiple connections
if (BungeeCord.instance.connections.containsKey(handshake.username))
{
throw new KickException("You are already connected to the server");
}
// fire post auth event
BungeeCord.instance.pluginManager.onLogin(event);
if (event.isCancelled())