MCPcopy Create free account
hub / github.com/Teneted/Tenet / getFullText

Method getFullText

src/main/java/org/bukkit/help/IndexHelpTopic.java:63–86  ·  view source on GitHub ↗
(@NotNull CommandSender sender)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

buildPreambleMethod · 0.95
buildIndexLineMethod · 0.95
canSeeMethod · 0.65
replaceMethod · 0.65
appendMethod · 0.45
lengthMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected