The array argument should be used to accept only a certain number of argument types or unlimited of those.
Usage
Implementation idea
Unlimited arguments can be implemented by using varargs. A positive side-effect is, that varargs are only allowed at the end of an method - like in command.
Screenshots or code
@Command(name = "kick")
public void test(Player sender, Player target, String... reason) {
String message = "";
for (String word : reason) a += message + " ";
target.kickPlayer(message);
}
This could be put in a argument wrapper like #16. The actual argument parsing shouldn't be too hard either, but i would extract all that argument parsing in a seperate class for all those aspects.
Description
The array argument should be used to accept only a certain number of argument types or unlimited of those.
Usage
Implementation idea Unlimited arguments can be implemented by using varargs. A positive side-effect is, that varargs are only allowed at the end of an method - like in command.
Screenshots or code