Command overload?

Java has method overload,
but as far as i konw, CommandSpec.Builder only allow one arguments combination to one executor
Is there a way to make a multiple argument combination to one command?
like below:

/tp Player
/tp Location
/tp Player Player
/tp Player Location

You can wrap arguments in optionals (iirc GenericArguments.optional(...)).
In your executor, you can then check, what arguments are present and do stuff based on that.

Alternatively, use GenericArguments.firstParsing(CommandElement...)


i see , thanks!