two-argument existence should not force all to be double

This commit is contained in:
jascotty2 2019-10-07 20:29:42 -05:00
parent 9fe7f1ac9e
commit 1f8f859d78

View File

@ -149,9 +149,9 @@ public class CommandManager implements CommandExecutor, TabCompleter {
String match = null;
// support for two-argument subcommands
if(args.length >= 2 && nested.children.keySet().stream().anyMatch(k -> k.indexOf(' ') != -1)) {
cmd = String.join(" ", args[0], args[1]);
if(nested.children.containsKey(cmd))
return cmd;
String cmd2 = String.join(" ", args[0], args[1]);
if(nested.children.containsKey(cmd2))
return cmd2;
}
// if we don't have a subcommand, should we search for one?
if (allowLooseCommands) {