Interface AsyncTabCompleteEvent.Completion
- Enclosing class:
AsyncTabCompleteEvent
public static interface AsyncTabCompleteEvent.Completion
A rich tab completion, consisting of a string suggestion, and a nullable
Component tooltip.- Since:
- 1.16.5
-
Method Summary
Modifier and TypeMethodDescriptioncompletion(String suggestion) Create a newAsyncTabCompleteEvent.Completionfrom a suggestion string.completion(String suggestion, @Nullable net.kyori.adventure.text.Component tooltip) Create a newAsyncTabCompleteEvent.Completionfrom a suggestion string and a tooltipComponent.Get the suggestion string for thisAsyncTabCompleteEvent.Completion.@Nullable net.kyori.adventure.text.Componenttooltip()Get the suggestion tooltip for thisAsyncTabCompleteEvent.Completion.
-
Method Details
-
suggestion
String suggestion()Get the suggestion string for thisAsyncTabCompleteEvent.Completion.- Returns:
- suggestion string
- Since:
- 1.16.5
-
tooltip
@Nullable net.kyori.adventure.text.Component tooltip()Get the suggestion tooltip for thisAsyncTabCompleteEvent.Completion.- Returns:
- tooltip component
- Since:
- 1.16.5
-
completion
Create a newAsyncTabCompleteEvent.Completionfrom a suggestion string.- Parameters:
suggestion- suggestion string- Returns:
- new completion instance
- Since:
- 1.16.5
-
completion
static AsyncTabCompleteEvent.Completion completion(String suggestion, @Nullable net.kyori.adventure.text.Component tooltip) Create a newAsyncTabCompleteEvent.Completionfrom a suggestion string and a tooltipComponent.If the provided component is
null, the suggestion will not have a tooltip.- Parameters:
suggestion- suggestion stringtooltip- tooltip component, ornull- Returns:
- new completion instance
- Since:
- 1.16.5
-