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 argument
previousArgs - previousArgs - a CommandArguments object 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 argument
currentInput - 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 Details

    • CustomArgumentInfo

      public CustomArgumentInfo(org.bukkit.command.CommandSender sender, CommandArguments previousArgs, String input, B currentInput)
      Creates an instance of a CustomArgumentInfo record class.
      Parameters:
      sender - the value for the sender record component
      previousArgs - the value for the previousArgs record component
      input - the value for the input record component
      currentInput - the value for the currentInput record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • sender

      public org.bukkit.command.CommandSender sender()
      Returns the value of the sender record component.
      Returns:
      the value of the sender record component
    • previousArgs

      public CommandArguments previousArgs()
      Returns the value of the previousArgs record component.
      Returns:
      the value of the previousArgs record component
    • input

      public String input()
      Returns the value of the input record component.
      Returns:
      the value of the input record component
    • currentInput

      public B currentInput()
      Returns the value of the currentInput record component.
      Returns:
      the value of the currentInput record component