When we get the arguments using CommandArguments#getArguments from tab completers for sub-commands, the arguments array contains all arguments even they should not contain the sub-command part.
Steps to Reproduce
public class Main extends JavaPlugin {
@Override
public void onEnable() {
CommandFramework commandFramework = new CommandFramework(this);
commandFramework.registerCommands(this);
}
@Command(
name = "test"
)
public void test() {
}
@Command(
name = "test.arg"
)
public void testArg() {
}
@Completer(
name = "test.arg"
)
public List<String> completer(CommandArguments arguments) {
getLogger().info(String.join(", ", arguments.getArguments()));
return null;
}
}
Command Framework Version
1.3.9
Server Version
git-Purpur-1949 (MC: 1.19.4)*
Stack Trace/Log Files/Crash Reports
// Main command is test, test.arg is a sub-command.
[13:07:44 INFO]: [Test] arg, a, b, c
[13:07:47 INFO]: [Test] arg,
Description of Issue
When we get the arguments using
CommandArguments#getArguments
from tab completers for sub-commands, the arguments array contains all arguments even they should not contain the sub-command part.Steps to Reproduce
Command Framework Version
1.3.9
Server Version
git-Purpur-1949 (MC: 1.19.4)*
Stack Trace/Log Files/Crash Reports