Class HelpEntry<T>

java.lang.Object
redempt.ordinate.help.HelpEntry<T>
Type Parameters:
T - The sender type

public class HelpEntry<T> extends Object
Represents help metadata used to generate help messages for commands
  • Field Details

  • Constructor Details

  • Method Details

    • getPage

      public HelpPage<T> getPage()
      Returns:
      The page this help entry is associated with
    • getOwner

      public Command<T> getOwner()
      Returns:
      The command this help entry describes
    • getComponents

      public List<HelpComponent> getComponents()
      Returns:
      The individual components of this help entry
    • addFilter

      public void addFilter(Predicate<T> constraint)
      Adds a filter to constrain the visibility of this help entry
      Parameters:
      constraint - The filter
    • isVisibleTo

      public boolean isVisibleTo(T sender)
      Checks this help entry's filters against the sender
      Parameters:
      sender - The sender
      Returns:
      Whether this help entry should be visible to the sender
    • getParentPrefix

      public String getParentPrefix()
      Returns:
      The names of the parents of the command described by this help entry, joined by spaces
    • getUsage

      public String getUsage()
      Returns:
      The name of the command followed by formatted arguments demonstrating its usage
    • getDescription

      public String getDescription()
      Returns:
      The help message for the command
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      A simple but potentially incomplete description of the command