As it is, if you execute a command and no matching sub-commands are found, the main executor is (theoretically) called. However, if I have a setup like this, it does not seem to be the case. I have one main command, “/warp”, and 3 sub-commands, '/warp list", “/warp set”, and “/warp delete”. However, if I attempt to use “/warp mywarp”, I expect it to use the default executor. This is apparently not the case, as the output I get is: “Input command mywarp was not a valid subcommand”, and then it gives me the usage of /warp. I have tried to resolve this issue multiple times, and I have been repeatedly assured that this works. Any ideas?
Note: I am on Forge build 1371 and Sponge build 438, as recommended
your existing issue isn’t matching the issue you’re describing here.
the issue you opened previously mentioned that children were not returning back to the default executor, not that the error message still popped up before throwing back to the executor. reopening your existing issue would not be appropriate, as it would be “out of scope” of the issue.
tl;dr go make a new issue; your old one isn’t related
@Zirconium
You have to properly specify the arguments to be accepted by the command. In your case, that would be something like firstParsing(subCommands, warp(t(“warp”))), where warp is a custom CommandElement you write that matches against stored warps.
I’m not sure why you would be passing in subCommands to firstParsing, and firstParsing only takes a List of CommandElements, and subCommands is a Map. Could you explain?
EDIT: I did as you suggested, creating a custom CommandElement… the new code looks like: