Set help command to short description and alternatives

- As discussed in https://github.com/AuthMe/AuthMeReloaded/pull/169
This commit is contained in:
ljacqu
2016-10-18 17:59:23 +02:00
parent dc8d0b9b6b
commit bb75d50c06
4 changed files with 52 additions and 13 deletions
@@ -14,6 +14,11 @@ import java.util.List;
import static fr.xephi.authme.command.FoundResultStatus.MISSING_BASE_COMMAND;
import static fr.xephi.authme.command.FoundResultStatus.UNKNOWN_LABEL;
import static fr.xephi.authme.command.help.HelpProvider.ALL_OPTIONS;
import static fr.xephi.authme.command.help.HelpProvider.SHOW_ALTERNATIVES;
import static fr.xephi.authme.command.help.HelpProvider.SHOW_CHILDREN;
import static fr.xephi.authme.command.help.HelpProvider.SHOW_COMMAND;
import static fr.xephi.authme.command.help.HelpProvider.SHOW_DESCRIPTION;
public class HelpCommand implements ExecutableCommand {
@@ -46,9 +51,9 @@ public class HelpCommand implements ExecutableCommand {
int mappedCommandLevel = result.getCommandDescription().getLabelCount();
if (mappedCommandLevel == 1) {
helpProvider.outputHelp(sender, result, HelpProvider.SHOW_CHILDREN);
helpProvider.outputHelp(sender, result, SHOW_COMMAND | SHOW_DESCRIPTION | SHOW_CHILDREN | SHOW_ALTERNATIVES);
} else {
helpProvider.outputHelp(sender, result, HelpProvider.ALL_OPTIONS);
helpProvider.outputHelp(sender, result, ALL_OPTIONS);
}
}