Class JoinGate
java.lang.Object
com.iantapply.orchestra.platform.paper.JoinGate
- All Implemented Interfaces:
org.bukkit.event.Listener
Thread-safe server-local gate that rejects new connections while disabled.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonLogin(io.papermc.paper.event.connection.PlayerConnectionValidateLoginEvent event) Rejects a login early when event operations have disabled joins.voidsetEnabled(boolean enabled) Updates the gate state.
-
Constructor Details
-
JoinGate
public JoinGate()Creates an enabled join gate.
-
-
Method Details
-
setEnabled
public void setEnabled(boolean enabled) Updates the gate state.- Parameters:
enabled- whether new player connections are accepted
-
onLogin
public void onLogin(io.papermc.paper.event.connection.PlayerConnectionValidateLoginEvent event) Rejects a login early when event operations have disabled joins.- Parameters:
event- connection validation event
-