Class ServerDefineCommandsEvent
java.lang.Object
org.geysermc.geyser.api.event.connection.ConnectionEvent
org.geysermc.geyser.api.event.java.ServerDefineCommandsEvent
- All Implemented Interfaces:
org.geysermc.event.Cancellable,org.geysermc.event.Event
public final class ServerDefineCommandsEvent
extends ConnectionEvent
implements org.geysermc.event.Cancellable
Called when the Java server defines the commands available on the server.
This event is mapped to the existence of Brigadier on the server.
This event is mapped to the existence of Brigadier on the server.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionServerDefineCommandsEvent(@NonNull GeyserConnection connection, @NonNull Set<? extends ServerDefineCommandsEvent.CommandInfo> commands) -
Method Summary
Modifier and TypeMethodDescription@NonNull Set<? extends ServerDefineCommandsEvent.CommandInfo> commands()A collection of commands sent from the server.booleanvoidsetCancelled(boolean cancelled) Methods inherited from class org.geysermc.geyser.api.event.connection.ConnectionEvent
connection
-
Constructor Details
-
ServerDefineCommandsEvent
public ServerDefineCommandsEvent(@NonNull GeyserConnection connection, @NonNull Set<? extends ServerDefineCommandsEvent.CommandInfo> commands)
-
-
Method Details
-
commands
A collection of commands sent from the server. Any element in this collection can be removed, but no element can be added.- Returns:
- a collection of the commands sent over
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceorg.geysermc.event.Cancellable
-
setCancelled
public void setCancelled(boolean cancelled) - Specified by:
setCancelledin interfaceorg.geysermc.event.Cancellable
-