Class GeyserCommand

java.lang.Object
org.geysermc.geyser.command.GeyserCommand
Direct Known Subclasses:
AdvancedTooltipsCommand, AdvancementsCommand, DumpCommand, HelpCommand, ListCommand, OffhandCommand, ReloadCommand, SettingsCommand, StatisticsCommand, StopCommand, VersionCommand

public abstract class GeyserCommand extends Object
  • Field Details

    • name

      protected final String name
    • description

      protected final String description
      The description of the command - will attempt to be translated.
    • permission

      protected final String permission
  • Constructor Details

    • GeyserCommand

      public GeyserCommand()
  • Method Details

    • execute

      public abstract void execute(@Nullable GeyserSession session, CommandSender sender, String[] args)
    • isExecutableOnConsole

      public boolean isExecutableOnConsole()
      If false, hides the command from being shown on the Geyser Standalone GUI.
      Returns:
      true if the command can be run on the server console
    • getSubCommands

      public List<String> getSubCommands()
      Used in the GUI to know what subcommands can be run
      Returns:
      a list of all possible subcommands, or empty if none.
    • hasSubCommands

      public boolean hasSubCommands()
      Shortcut to getSubCommands().isEmpty().
      Returns:
      true if there are subcommand present for this command.
    • isBedrockOnly

      public boolean isBedrockOnly()
      Used to send a deny message to Java players if this command can only be used by Bedrock players.
      Returns:
      true if this command can only be used by Bedrock players.