Package net.apartium.cocoabeans.commands
Record Class HelpMenu
java.lang.Object
java.lang.Record
net.apartium.cocoabeans.commands.HelpMenu
- Record Components:
label- The primary label or title of the help menu.aliases- A list of alternative aliases for the help menu, allowing it to be accessed with different terms.info- The command information, including descriptions, usages, and long descriptions relevant to the help menu.requirements- A set of requirements that must be fulfilled to access or view this help menu. These can include permissions or other conditions.entries- A list ofHelpMenuEntryinstances representing the individual entries within the help menu, each containing detailed information about specific command sub-sections.
@AvailableSince("0.0.50")
public record HelpMenu(String label, List<String> aliases, CommandInfo info, Set<Requirement> requirements, List<HelpMenuEntry> entries)
extends Record
Represents a help menu for commands, containing essential metadata, requirements, and entries.
A help menu is associated with specific commands and provides guidance on their usage and descriptions.
-
Constructor Summary
ConstructorsConstructorDescriptionHelpMenu(String label, List<String> aliases, CommandInfo info, Set<Requirement> requirements, List<HelpMenuEntry> entries) Creates an instance of aHelpMenurecord class. -
Method Summary
Modifier and TypeMethodDescriptionaliases()Returns the value of thealiasesrecord component.entries()Returns the value of theentriesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.info()Returns the value of theinforecord component.label()Returns the value of thelabelrecord component.Returns the value of therequirementsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HelpMenu
public HelpMenu(String label, List<String> aliases, CommandInfo info, Set<Requirement> requirements, List<HelpMenuEntry> entries) Creates an instance of aHelpMenurecord class.- Parameters:
label- the value for thelabelrecord componentaliases- the value for thealiasesrecord componentinfo- the value for theinforecord componentrequirements- the value for therequirementsrecord componententries- the value for theentriesrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
aliases
Returns the value of thealiasesrecord component.- Returns:
- the value of the
aliasesrecord component
-
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-
requirements
Returns the value of therequirementsrecord component.- Returns:
- the value of the
requirementsrecord component
-
entries
Returns the value of theentriesrecord component.- Returns:
- the value of the
entriesrecord component
-