Package dev.jorel.commandapi
Record Class SuggestionInfo<CommandSender>
java.lang.Object
java.lang.Record
dev.jorel.commandapi.SuggestionInfo<CommandSender>
- Record Components:
sender- - the CommandSender typing this commandpreviousArgs- - aCommandArgumentsobject holding previously declared (and parsed) arguments. This can be used as if it were arguments in a command executor methodcurrentInput- - a string representing the full current input (including /)currentArg- - the current partially typed argument. For example "/mycmd tes" will return "tes"
public record SuggestionInfo<CommandSender>(CommandSender sender, CommandArguments previousArgs, String currentInput, String currentArg)
extends Record
A class that represents information which you can use to generate
suggestions.
-
Constructor Summary
ConstructorsConstructorDescriptionSuggestionInfo(CommandSender sender, CommandArguments previousArgs, String currentInput, String currentArg) Creates an instance of aSuggestionInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentArgrecord component.Returns the value of thecurrentInputrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thepreviousArgsrecord component.sender()Returns the value of thesenderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SuggestionInfo
public SuggestionInfo(CommandSender sender, CommandArguments previousArgs, String currentInput, String currentArg) Creates an instance of aSuggestionInforecord class.- Parameters:
sender- the value for thesenderrecord componentpreviousArgs- the value for thepreviousArgsrecord componentcurrentInput- the value for thecurrentInputrecord componentcurrentArg- the value for thecurrentArgrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
sender
-
previousArgs
Returns the value of thepreviousArgsrecord component.- Returns:
- the value of the
previousArgsrecord component
-
currentInput
Returns the value of thecurrentInputrecord component.- Returns:
- the value of the
currentInputrecord component
-
currentArg
Returns the value of thecurrentArgrecord component.- Returns:
- the value of the
currentArgrecord component
-