Interface CommandFacade


public interface CommandFacade
A CommandFacade is a simple abstraction for advanced command systems in Mindustry. It is typically implemented by a CommandHandler.Command.
  • Method Details

    • from

      static CommandFacade from(arc.util.CommandHandler.Command command)
      Extracts a CommandFacade from a native command.
      Parameters:
      command - the command to extract from
      Returns:
      the facade of the native command
    • getRealName

      String getRealName()
      Returns the real name of this command.
    • getName

      String getName()
      Returns the name of this command. Usually returns getRealName(), but if another command with the same name was registered before, the owning plugin identifier will be prefixed to the name. Such as plugin:name.
    • getDescription

      DescriptionFacade getDescription()
      Returns the description of the root command node or the command itself.
    • isAlias

      boolean isAlias()
      Returns whether this command is an alias of another command.
    • isVisible

      boolean isVisible(CommandSender sender)
      Returns whether this command is visible at all to the given sender.
      Parameters:
      sender - the sender to check visibility for
      Returns:
      whether this command is visible to the given sender
    • getHelp

      CommandHelp getHelp(CommandSender sender, String query)
      Returns the help information for this command. The result is affected by the permissions of the sender.
      Parameters:
      sender - the sender to get the help for
      query - the query to get the help for
      Returns:
      the help information for this command
    • getPlugin

      @Nullable MindustryPlugin getPlugin()
      Returns the plugin that owns this command.