(@NotNull CommandSender sender)
| 61 | } |
| 62 | |
| 63 | @Override |
| 64 | @NotNull |
| 65 | public String getFullText(@NotNull CommandSender sender) { |
| 66 | StringBuilder sb = new StringBuilder(); |
| 67 | |
| 68 | if (preamble != null) { |
| 69 | sb.append(buildPreamble(sender)); |
| 70 | sb.append("\n"); |
| 71 | } |
| 72 | |
| 73 | for (HelpTopic topic : allTopics) { |
| 74 | if (topic.canSee(sender)) { |
| 75 | String lineStr = buildIndexLine(sender, topic).replace("\n", ". "); |
| 76 | if (sender instanceof Player && lineStr.length() > ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH) { |
| 77 | sb.append(lineStr, 0, ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH - 3); |
| 78 | sb.append("..."); |
| 79 | } else { |
| 80 | sb.append(lineStr); |
| 81 | } |
| 82 | sb.append("\n"); |
| 83 | } |
| 84 | } |
| 85 | return sb.toString(); |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Builds the topic preamble. Override this method to change how the index |
nothing calls this directly
no test coverage detected