Package studio.mevera.imperat.help
Class VelocityAdventureHelpComponent
java.lang.Object
studio.mevera.imperat.command.tree.help.theme.HelpComponent<VelocitySource,net.kyori.adventure.text.Component>
studio.mevera.imperat.adventure.AdventureHelpComponent<VelocitySource>
studio.mevera.imperat.help.VelocityAdventureHelpComponent
public class VelocityAdventureHelpComponent
extends studio.mevera.imperat.adventure.AdventureHelpComponent<VelocitySource>
Velocity-specific implementation of Adventure-based help components.
This class provides rich text help messages for Velocity commands using the Adventure API,
allowing for styled, colored, and interactive help content.
Features:
- Rich text formatting with Adventure Components
- Automatic integration with VelocitySource messaging
- Support for clickable, hoverable, and styled text
- Seamless help system integration
Usage Example:
Component helpText = Component.text("Use /mycommand <player>")
.color(NamedTextColor.YELLOW);
VelocityAdventureHelpComponent help = VelocityAdventureHelpComponent.of(helpText);
- Since:
- 2.1.0
- See Also:
-
Field Summary
Fields inherited from class studio.mevera.imperat.command.tree.help.theme.HelpComponent
componentValue -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVelocityAdventureHelpComponent(@NotNull net.kyori.adventure.text.Component componentValue, BiConsumer<VelocitySource, net.kyori.adventure.text.Component> sendMessageToSourceFunc) Creates a new VelocityAdventureHelpComponent with the specified component and message sender. -
Method Summary
Modifier and TypeMethodDescriptionof(@NotNull net.kyori.adventure.text.Component componentValue) Creates a new VelocityAdventureHelpComponent with the specified Adventure Component.Methods inherited from class studio.mevera.imperat.adventure.AdventureHelpComponent
append, appendText, repeat, sendMethods inherited from class studio.mevera.imperat.command.tree.help.theme.HelpComponent
append, appendParameterFormat, appendText, plainText
-
Constructor Details
-
VelocityAdventureHelpComponent
protected VelocityAdventureHelpComponent(@NotNull @NotNull net.kyori.adventure.text.Component componentValue, BiConsumer<VelocitySource, net.kyori.adventure.text.Component> sendMessageToSourceFunc) Creates a new VelocityAdventureHelpComponent with the specified component and message sender.- Parameters:
componentValue- the Adventure Component to display as helpsendMessageToSourceFunc- function to send the component to a VelocitySource
-
-
Method Details
-
of
public static VelocityAdventureHelpComponent of(@NotNull @NotNull net.kyori.adventure.text.Component componentValue) Creates a new VelocityAdventureHelpComponent with the specified Adventure Component. Uses the default VelocitySource reply method for sending messages.- Parameters:
componentValue- the Adventure Component to display as help- Returns:
- a new VelocityAdventureHelpComponent instance
-