Interface TooltipSuggestion

All Superinterfaces:
org.incendo.cloud.suggestion.Suggestion
All Known Implementing Classes:
TooltipSuggestion.TooltipSuggestionImpl

@API(status=STABLE, since="2.0.0") public interface TooltipSuggestion extends org.incendo.cloud.suggestion.Suggestion
Suggestion that has an optional Brigadier message tooltip.
Since:
2.0.0
  • Method Details

    • tooltipSuggestion

      static @NonNull TooltipSuggestion tooltipSuggestion(@NonNull String suggestion, @Nullable com.mojang.brigadier.Message tooltip)
      Returns a new TooltipSuggestion with the given suggestion and tooltip.
      Parameters:
      suggestion - the suggestion
      tooltip - the optional tooltip that is displayed when hovering over the suggestion
      Returns:
      the suggestion instance
    • tooltipSuggestion

      static @NonNull TooltipSuggestion tooltipSuggestion(@NonNull org.incendo.cloud.suggestion.Suggestion suggestion)
      Returns a new TooltipSuggestion that uses the given suggestion and has a null tooltip.
      Parameters:
      suggestion - the suggestion
      Returns:
      the suggestion instance
    • tooltip

      @Nullable com.mojang.brigadier.Message tooltip()
      Returns the tooltip.
      Returns:
      the tooltip, or null
    • withSuggestion

      default @NonNull TooltipSuggestion withSuggestion(@NonNull String string)
      Specified by:
      withSuggestion in interface org.incendo.cloud.suggestion.Suggestion
    • withTooltip

      default @NonNull TooltipSuggestion withTooltip(@NonNull com.mojang.brigadier.Message tooltip)
      Returns a copy of this suggestion instance using the given tooltip
      Parameters:
      tooltip - the new tooltip
      Returns:
      the new suggestion