Interface CommandCompletion


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

      All Methods Static Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.String completion()
      The potential completion that this object represents.
      static CommandCompletion of​(@NonNull java.lang.String completion)
      Creates a basic completion that only contains String that a given input may be completed to.
      static CommandCompletion of​(@NonNull java.lang.String completion, @Nullable Component tooltip)
      Creates a completion that contains String that a given input may be completed to, and an associated tooltip.
      java.util.Optional<Component> tooltip()
      The tooltip that may be displayed by the client when hovering over this completion.
    • Method Detail

      • of

        static CommandCompletion of​(@NonNull java.lang.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 java.lang.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

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

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