CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
|
Public Member Functions | |
String | getSuggestion () |
Returns the current suggestion that this class holds. More... | |
Message | getTooltip () |
Returns the current tooltip text that this class holds. More... | |
Static Public Member Functions | |
static StringTooltip | ofBaseComponents (String suggestion, BaseComponent... tooltip) |
Constructs a StringTooltip with a suggestion and a formatted bungee text component tooltip. More... | |
static StringTooltip | ofAdventureComponent (String suggestion, Component tooltip) |
Constructs a StringTooltip with a suggestion and a formatted adventure text component tooltip. More... | |
static Collection< StringTooltip > | generateBaseComponents (Function< String, BaseComponent[]> tooltipGenerator, String... suggestions) |
Constructs a collection of StringTooltip objects from an array of suggestions, and a function which generates a formatted tooltip for each suggestion. More... | |
static Collection< StringTooltip > | generateBaseComponents (Function< String, BaseComponent[]> tooltipGenerator, Collection< String > suggestions) |
Constructs a collection of StringTooltip objects from a collection of suggestions, and a function which generates a formatted tooltip for each suggestion. More... | |
static Collection< StringTooltip > | generateAdventureComponents (Function< String, Component > tooltipGenerator, String... suggestions) |
Constructs a collection of StringTooltip objects from an array of suggestions, and a function which generates a tooltip formatted as an adventure Component for each suggestion. More... | |
static Collection< StringTooltip > | generateAdventureComponents (Function< String, Component > tooltipGenerator, Collection< String > suggestions) |
Constructs a collection of StringTooltip objects from a collection of suggestions, and a function which generates a tooltip formatted as an adventure Component for each suggestion. More... | |
static StringTooltip | ofString (String suggestion, String tooltip) |
Constructs a StringTooltip with a suggestion and a string tooltip. More... | |
static StringTooltip | ofMessage (String suggestion, Message tooltip) |
Constructs a StringTooltip with a suggestion and a formatted tooltip. More... | |
static StringTooltip | none (String suggestion) |
Constructs a StringTooltip with a suggestion and no tooltip. More... | |
static Collection< StringTooltip > | none (String... suggestions) |
Constructs a collection of StringTooltip objects from an array of suggestions, and no tooltips. More... | |
static Collection< StringTooltip > | none (Collection< String > suggestions) |
Constructs a collection of StringTooltip objects from a collection of suggestions, and no tooltips. More... | |
static Collection< StringTooltip > | generateStrings (UnaryOperator< String > tooltipGenerator, String... suggestions) |
Constructs a collection of StringTooltip objects from an array of suggestions, and a function which generates a string tooltip for each suggestion. More... | |
static Collection< StringTooltip > | generateStrings (UnaryOperator< String > tooltipGenerator, Collection< String > suggestions) |
Constructs a collection of StringTooltip objects from a collection of suggestions, and a function which generates a string tooltip for each suggestion. More... | |
static Collection< StringTooltip > | generateMessages (Function< String, Message > tooltipGenerator, String... suggestions) |
Constructs a collection of StringTooltip objects from an array of suggestions, and a function which generates a formatted tooltip for each suggestion. More... | |
static Collection< StringTooltip > | generateMessages (Function< String, Message > tooltipGenerator, Collection< String > suggestions) |
Constructs a collection of StringTooltip objects from a collection of suggestions, and a function which generates a formatted tooltip for each suggestion. More... | |
Protected Member Functions | |
BukkitStringTooltip (String suggestion, Message tooltip) | |
Static Protected Member Functions | |
static< T > Collection< StringTooltip > | generate (Function< String, T > tooltipGenerator, BiFunction< String, T, StringTooltip > tooltipWrapper, String... suggestions) |
Internal base method for the other generation types. More... | |
static< T > Collection< StringTooltip > | generate (Function< String, T > tooltipGenerator, BiFunction< String, T, StringTooltip > tooltipWrapper, Collection< String > suggestions) |
Internal base method for the other generation types. More... | |
static< T > Collection< StringTooltip > | generate (Function< String, T > tooltipGenerator, BiFunction< String, T, StringTooltip > tooltipWrapper, Stream< String > suggestions) |
Internal base method for the other generation types. More... | |
|
staticprotectedinherited |
Internal base method for the other generation types.
<T> | the type of the tooltip |
tooltipGenerator | tooltip generation function |
tooltipWrapper | function which wraps suggestion and tooltip into a StringTooltip object |
suggestions | collection of suggestions to provide to the user |
StringTooltip
objects from the provided suggestion, wrapped using the above functions
|
staticprotectedinherited |
Internal base method for the other generation types.
<T> | the type of the tooltip |
tooltipGenerator | tooltip generation function |
tooltipWrapper | function which wraps suggestion and tooltip into a StringTooltip object |
suggestions | stream of suggestions to provide to the user |
StringTooltip
objects from the provided suggestion, wrapped using the above functions
|
staticprotectedinherited |
Internal base method for the other generation types.
<T> | the type of the tooltip |
tooltipGenerator | tooltip generation function |
tooltipWrapper | function which wraps suggestion and tooltip into a StringTooltip object |
suggestions | array of suggestions to provide to the user |
StringTooltip
objects from the provided suggestion, wrapped using the above functions
|
static |
Constructs a collection of StringTooltip
objects from a collection of suggestions, and a function which generates a tooltip formatted as an adventure Component
for each suggestion.
tooltipGenerator | function which returns a formatted tooltip for the suggestion, an adventure Component |
suggestions | collection of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated formatted tooltips
|
static |
Constructs a collection of StringTooltip
objects from an array of suggestions, and a function which generates a tooltip formatted as an adventure Component
for each suggestion.
tooltipGenerator | function which returns a formatted tooltip for the suggestion, an adventure Component |
suggestions | array of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated formatted tooltips
|
static |
Constructs a collection of StringTooltip
objects from a collection of suggestions, and a function which generates a formatted tooltip for each suggestion.
tooltipGenerator | function which returns a formatted tooltip for the suggestion, an array of BaseComponent s |
suggestions | collection of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated formatted tooltips
|
static |
Constructs a collection of StringTooltip
objects from an array of suggestions, and a function which generates a formatted tooltip for each suggestion.
tooltipGenerator | function which returns a formatted tooltip for the suggestion, an array of BaseComponent s |
suggestions | array of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated formatted tooltips
|
staticinherited |
Constructs a collection of StringTooltip
objects from a collection of suggestions, and a function which generates a formatted tooltip for each suggestion.
tooltipGenerator | function which returns a formatted tooltip for the suggestion |
suggestions | collection of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated formatted tooltips
|
staticinherited |
Constructs a collection of StringTooltip
objects from an array of suggestions, and a function which generates a formatted tooltip for each suggestion.
tooltipGenerator | function which returns a formatted tooltip for the suggestion |
suggestions | array of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated formatted tooltips
|
staticinherited |
Constructs a collection of StringTooltip
objects from a collection of suggestions, and a function which generates a string tooltip for each suggestion.
tooltipGenerator | function which returns a string tooltip for the suggestion |
suggestions | collection of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated string tooltips
|
staticinherited |
Constructs a collection of StringTooltip
objects from an array of suggestions, and a function which generates a string tooltip for each suggestion.
tooltipGenerator | function which returns a string tooltip for the suggestion |
suggestions | array of suggestions to provide to the user |
StringTooltip
objects from the provided suggestions, with the generated string tooltips
|
inherited |
Returns the current suggestion that this class holds.
Implements dev.jorel.commandapi.IStringTooltip.
|
inherited |
Returns the current tooltip text that this class holds.
Implements dev.jorel.commandapi.IStringTooltip.
|
staticinherited |
Constructs a collection of StringTooltip
objects from a collection of suggestions, and no tooltips.
suggestions | collection of suggestions to provide to the user |
StringTooltip
objects from the suggestions, with no tooltips
|
staticinherited |
Constructs a StringTooltip with a suggestion and no tooltip.
suggestion | the suggestion to provide to the user |
|
staticinherited |
Constructs a collection of StringTooltip
objects from an array of suggestions, and no tooltips.
suggestions | array of suggestions to provide to the user |
StringTooltip
objects from the suggestions, with no tooltips
|
static |
Constructs a StringTooltip with a suggestion and a formatted adventure text component tooltip.
suggestion | the suggestion to provide to the user |
tooltip | the formatted tooltip to show to the user when they hover over the suggestion |
|
static |
Constructs a StringTooltip with a suggestion and a formatted bungee text component tooltip.
suggestion | the suggestion to provide to the user |
tooltip | the formatted tooltip to show to the user when they hover over the suggestion |
|
staticinherited |
Constructs a StringTooltip with a suggestion and a formatted tooltip.
suggestion | the suggestion to provide to the user |
tooltip | the formatted tooltip to show to the user when they hover over the suggestion |
|
staticinherited |
Constructs a StringTooltip with a suggestion and a string tooltip.
suggestion | the suggestion to provide to the user |
tooltip | the string tooltip to show to the user when they hover over the suggestion |