Package dev.jorel.commandapi.arguments
Record Class CustomArgument.CustomArgumentInfo<B>
java.lang.Object
java.lang.Record
dev.jorel.commandapi.arguments.CustomArgument.CustomArgumentInfo<B>
- Record Components:
sender- the sender that types this argumentpreviousArgs- previousArgs - aCommandArgumentsobject holding previously declared (parsed) arguments. This can be used as if it were arguments in a command executor method.input- the current input which the user has typed for this argumentcurrentInput- the current input, when parsed with the underlying base argument.
- Enclosing class:
CustomArgument<T,B>
public static record CustomArgument.CustomArgumentInfo<B>(org.bukkit.command.CommandSender sender, CommandArguments previousArgs, String input, B currentInput)
extends Record
A record which contains information which can be passed to the custom
argument's parser.
-
Constructor Summary
ConstructorsConstructorDescriptionCustomArgumentInfo(org.bukkit.command.CommandSender sender, CommandArguments previousArgs, String input, B currentInput) Creates an instance of aCustomArgumentInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns 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.input()Returns the value of theinputrecord component.Returns the value of thepreviousArgsrecord component.org.bukkit.command.CommandSendersender()Returns the value of thesenderrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CustomArgumentInfo
public CustomArgumentInfo(org.bukkit.command.CommandSender sender, CommandArguments previousArgs, String input, B currentInput) Creates an instance of aCustomArgumentInforecord class.- Parameters:
sender- the value for thesenderrecord componentpreviousArgs- the value for thepreviousArgsrecord componentinput- the value for theinputrecord componentcurrentInput- the value for thecurrentInputrecord 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
-
input
-
currentInput
Returns the value of thecurrentInputrecord component.- Returns:
- the value of the
currentInputrecord component
-