Interface MinecraftHelp.DescriptionDecorator<C>
- Enclosing class:
MinecraftHelp<C>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@API(status=STABLE,
since="2.0.0")
@FunctionalInterface
public static interface MinecraftHelp.DescriptionDecorator<C>
-
Method Summary
Modifier and TypeMethodDescriptionTurns the givendescriptioninto an adventureComponent.static <C> @NonNull MinecraftHelp.DescriptionDecorator<C> text()Returns a description decorator that turns the description into a text component without any style.static <C> @NonNull MinecraftHelp.DescriptionDecorator<C> Return a description decorator that wraps the givenfunction.
-
Method Details
-
wrap
static <C> @NonNull MinecraftHelp.DescriptionDecorator<C> wrap(@NonNull Function<String, Component> function) Return a description decorator that wraps the givenfunction.- Type Parameters:
C- the command sender type- Parameters:
function- the function- Returns:
- the decorator
-
text
Returns a description decorator that turns the description into a text component without any style.- Type Parameters:
C- the command sender type- Returns:
- the decorator
-
decorate
Turns the givendescriptioninto an adventureComponent.- Parameters:
sender- command senderdescription- description- Returns:
- component
-