Interface CommandCompletion


  • public interface CommandCompletion
    A potential completion of a command argument.
    • Method Detail

      • 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