Prevent users from connecting many times under some circumstances.
This commit is contained in:
parent
be6fedfa68
commit
12bf653bbc
@ -59,6 +59,12 @@ public class InitialHandler implements Runnable
|
|||||||
throw new KickException("Not authenticated with minecraft.net");
|
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
|
// fire post auth event
|
||||||
BungeeCord.instance.pluginManager.onLogin(event);
|
BungeeCord.instance.pluginManager.onLogin(event);
|
||||||
if (event.isCancelled())
|
if (event.isCancelled())
|
||||||
|
Loading…
Reference in New Issue
Block a user