Interface TooltipSuggestion
- All Superinterfaces:
Suggestion
- All Known Implementing Classes:
TooltipSuggestion.TooltipSuggestionImpl
Suggestion that has an optional Brigadier message tooltip.- Since:
- 2.0.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable com.mojang.brigadier.Messagetooltip()Returns the tooltip.static @NonNull TooltipSuggestiontooltipSuggestion(@NonNull String suggestion, @Nullable com.mojang.brigadier.Message tooltip) static @NonNull TooltipSuggestiontooltipSuggestion(@NonNull Suggestion suggestion) default @NonNull TooltipSuggestionwithSuggestion(@NonNull String string) default @NonNull TooltipSuggestionwithTooltip(@NonNull com.mojang.brigadier.Message tooltip) Returns a copy of this suggestion instance using the giventooltipMethods inherited from interface org.incendo.cloud.suggestion.Suggestion
suggestion
-
Method Details
-
tooltipSuggestion
static @NonNull TooltipSuggestion tooltipSuggestion(@NonNull String suggestion, @Nullable com.mojang.brigadier.Message tooltip) - Parameters:
suggestion- the suggestiontooltip- the optional tooltip that is displayed when hovering over the suggestion- Returns:
- the suggestion instance
-
tooltipSuggestion
- Parameters:
suggestion- the suggestion- Returns:
- the suggestion instance
-
tooltip
@Nullable com.mojang.brigadier.Message tooltip()Returns the tooltip.- Returns:
- the tooltip, or
null
-
withSuggestion
- Specified by:
withSuggestionin interfaceSuggestion
-
withTooltip
Returns a copy of this suggestion instance using the giventooltip- Parameters:
tooltip- the new tooltip- Returns:
- the new suggestion
-