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(GeyserConnection connection, Set<? extends ServerDefineCommandsEvent.CommandInfo> commands) -
Method Summary
Modifier and TypeMethodDescriptionbooleanWhether the event is cancelled.voidcancelled(boolean cancelled) Sets whether the event is cancelled.Set<? extends ServerDefineCommandsEvent.CommandInfo> commands()A collection of commands sent from the server.Methods inherited from class org.geysermc.geyser.api.event.connection.ConnectionEvent
connectionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.event.Cancellable
isCancelled, setCancelled
-
Constructor Details
-
ServerDefineCommandsEvent
public ServerDefineCommandsEvent(GeyserConnection connection, 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
-
cancelled
public boolean cancelled()Whether the event is cancelled.- Specified by:
cancelledin interfaceorg.geysermc.event.Cancellable- Returns:
- true if the event is cancelled, false otherwise
- Since:
- 3.0.0
-
cancelled
public void cancelled(boolean cancelled) Sets whether the event is cancelled.- Specified by:
cancelledin interfaceorg.geysermc.event.Cancellable- Parameters:
cancelled- if the event is cancelled- Since:
- 3.0.0
-