class HelpCommand implements ExecutableCommand {

    @Override
    public void executeCommand(CommandSender sender, List<String> arguments) {
        FoundCommandResult result = commandMapper.mapPartsToCommand(sender, arguments);

        FoundResultStatus resultStatus = result.getResultStatus();
        if (MISSING_BASE_COMMAND.equals(resultStatus)) {
            sender.sendMessage(ChatColor.DARK_RED + "Could not get base command");
            return;
        } else if (UNKNOWN_LABEL.equals(resultStatus)) {
            if (result.getCommandDescription() == null) {
                sender.sendMessage(ChatColor.DARK_RED + "Unknown command");
                return;
            } else {
                sender.sendMessage(ChatColor.GOLD + "Assuming " + ChatColor.WHITE
                    + CommandUtils.constructCommandPath(result.getCommandDescription()));
            }
        }

        int mappedCommandLevel = result.getCommandDescription().getLabelCount();
        if (mappedCommandLevel == 1) {
            helpProvider.outputHelp(sender, result,
                SHOW_COMMAND | SHOW_DESCRIPTION | SHOW_CHILDREN | SHOW_ALTERNATIVES);
        } else {
            helpProvider.outputHelp(sender, result, ALL_OPTIONS);
        }
    }

}