Close issue #24 by adding hostname paramater to login event
This commit is contained in:
parent
6f005064a1
commit
88babcaea1
@ -39,7 +39,7 @@ public class InitialHandler implements Runnable
|
|||||||
case 0x02:
|
case 0x02:
|
||||||
Packet2Handshake handshake = new Packet2Handshake(packet);
|
Packet2Handshake handshake = new Packet2Handshake(packet);
|
||||||
// fire connect event
|
// fire connect event
|
||||||
LoginEvent event = new LoginEvent(handshake.username, socket.getInetAddress());
|
LoginEvent event = new LoginEvent(handshake.username, socket.getInetAddress(), handshake.host);
|
||||||
BungeeCord.instance.pluginManager.onHandshake(event);
|
BungeeCord.instance.pluginManager.onHandshake(event);
|
||||||
if (event.isCancelled())
|
if (event.isCancelled())
|
||||||
{
|
{
|
||||||
|
@ -26,4 +26,8 @@ public class LoginEvent implements Cancellable
|
|||||||
* IP address of the remote connection.
|
* IP address of the remote connection.
|
||||||
*/
|
*/
|
||||||
private final InetAddress address;
|
private final InetAddress address;
|
||||||
|
/**
|
||||||
|
* Hostname which the user tried to connect to.
|
||||||
|
*/
|
||||||
|
private final String hostname;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user