Package org.geysermc.geyser.network
Class ConnectionRequests
java.lang.Object
org.geysermc.geyser.network.ConnectionRequests
The pre-authentication gate every inbound connection passes, whichever transport carried it.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanaccept(GeyserImpl geyser, InetSocketAddress clientAddress, @Nullable InetSocketAddress proxyAddress) FiresConnectionRequestEventand reports whether the connection may proceed.
-
Method Details
-
accept
public static boolean accept(GeyserImpl geyser, InetSocketAddress clientAddress, @Nullable InetSocketAddress proxyAddress) FiresConnectionRequestEventand reports whether the connection may proceed.Extensions use this to refuse a peer by address, before any session exists, so every transport has to ask before it creates one.
- Parameters:
geyser- The running instanceclientAddress- The address the connection came fromproxyAddress- The proxy that forwarded it, or null when the transport has no proxy support- Returns:
- true when the connection may proceed
-