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

    Constructors
    Modifier
    Constructor
    Description
    protected
    VelocityAdventureHelpComponent(@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 Type
    Method
    Description
    of(@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, send

    Methods inherited from class studio.mevera.imperat.command.tree.help.theme.HelpComponent

    append, appendParameterFormat, appendText, plainText

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 help
      sendMessageToSourceFunc - 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