Interface PlayerFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for filtering players before a connection is created for them.
-
Method Summary
Modifier and TypeMethodDescription@Nullable JoinRefusalrefuse(String host, PlayerInfo player) Called once the identity attached to an SDP offer has been validated, before the connection is handed to theNetherNetServerSignaling.NewConnectionHandler.
-
Method Details
-
refuse
Called once the identity attached to an SDP offer has been validated, before the connection is handed to theNetherNetServerSignaling.NewConnectionHandler.Called on the event loop, so don't block in here. A thrown exception turns the player away as
JoinRefusal.REJECTEDdoes.- Parameters:
host- The host header from the join request, which may be used to identify the serverplayer- The validated player attempting to join- Returns:
- Why to turn the player away, or null to let them in
-