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.
  • Constructor Details

  • Method Details

    • commands

      public Set<? extends ServerDefineCommandsEvent.CommandInfo> 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:
      cancelled in interface org.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:
      cancelled in interface org.geysermc.event.Cancellable
      Parameters:
      cancelled - if the event is cancelled
      Since:
      3.0.0