Interface CommandSyntaxFormatter<C>

Type Parameters:
C - command sender type
All Known Implementing Classes:
StandardCommandSyntaxFormatter
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @API(status=STABLE) public interface CommandSyntaxFormatter<C>
Utility that formats chains of command components into syntax strings
  • Method Details

    • apply

      @NonNull String apply(@Nullable C sender, @NonNull List<@NonNull CommandComponent<C>> commandComponents, @Nullable CommandNode<C> node)
      Format the command arguments into a syntax string
      Parameters:
      sender - The sender to format syntax for.
      commandComponents - Command arguments that have been unambiguously specified up until this point. This should include the "current" command, if such a command exists.
      node - The current command node. The children of this node will be appended onto the command syntax string, as long as an unambiguous path can be identified. The node itself will not be appended onto the syntax string. This can be set to null if no node is relevant at the point of formatting.
      Returns:
      The formatted syntax string