#2761: Add ClientConnectEvent

This commit is contained in:
markusmarkusz
2020-02-02 10:48:22 +11:00
committed by md_5
parent a3ab2bf58e
commit b4b998b2e5
2 changed files with 45 additions and 1 deletions

View File

@@ -0,0 +1,35 @@
package net.md_5.bungee.api.event;
import java.net.SocketAddress;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import net.md_5.bungee.api.config.ListenerInfo;
import net.md_5.bungee.api.plugin.Cancellable;
import net.md_5.bungee.api.plugin.Event;
/**
* Event called to represent an initial client connection.
* <br>
* Note: This event is called at an early stage of every connection, handling
* should be <b>fast</b>.
*/
@Data
@ToString(callSuper = false)
@EqualsAndHashCode(callSuper = false)
public class ClientConnectEvent extends Event implements Cancellable
{
/**
* Cancelled state.
*/
private boolean cancelled;
/**
* Remote address of connection.
*/
private final SocketAddress socketAddress;
/**
* Listener that accepted the connection.
*/
private final ListenerInfo listener;
}