Interface CommandCompletion


public interface CommandCompletion
A potential completion of a command argument.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A factory for constructing CommandCompletions
  • Method Summary

    Modifier and Type
    Method
    Description
    The potential completion that this object represents.
    of(@NonNull String completion)
    Creates a basic completion that only contains String that a given input may be completed to.
    of(@NonNull String completion, @Nullable Component tooltip)
    Creates a completion that contains String that a given input may be completed to, and an associated tooltip.
    The tooltip that may be displayed by the client when hovering over this completion.
  • Method Details

    • of

      static CommandCompletion of(@NonNull String completion)
      Creates a basic completion that only contains String that a given input may be completed to.
      Parameters:
      completion - The potential completion
      Returns:
      The CommandCompletion object
    • of

      static CommandCompletion of(@NonNull String completion, @Nullable Component tooltip)
      Creates a completion that contains String that a given input may be completed to, and an associated tooltip.
      Parameters:
      completion - The potential completion
      tooltip - The tooltip
      Returns:
      The CommandCompletion object
    • completion

      String completion()
      The potential completion that this object represents.
      Returns:
      The completion
    • tooltip

      Optional<Component> tooltip()
      The tooltip that may be displayed by the client when hovering over this completion.
      Returns:
      The tooltip, if any