diff options
author | rmichela <deltahat@gmail.com> | 2012-03-15 02:26:07 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-16 02:44:30 -0400 |
commit | d6e1f635297299b959550af3366eecc6f35990c0 (patch) | |
tree | a23afe095caa7a41a38f760cd030c318146ad8e7 /src | |
parent | 494c913fef61e416e30e2d095a7187e6a80e9b69 (diff) | |
download | bukkit-d6e1f635297299b959550af3366eecc6f35990c0.tar bukkit-d6e1f635297299b959550af3366eecc6f35990c0.tar.gz bukkit-d6e1f635297299b959550af3366eecc6f35990c0.tar.lz bukkit-d6e1f635297299b959550af3366eecc6f35990c0.tar.xz bukkit-d6e1f635297299b959550af3366eecc6f35990c0.zip |
Aesthetic changes to the /help command.
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/command/defaults/HelpCommand.java | 11 | ||||
-rw-r--r-- | src/main/java/org/bukkit/help/IndexHelpTopic.java | 4 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/command/defaults/HelpCommand.java b/src/main/java/org/bukkit/command/defaults/HelpCommand.java index 9ea5d6d6..90523823 100644 --- a/src/main/java/org/bukkit/command/defaults/HelpCommand.java +++ b/src/main/java/org/bukkit/command/defaults/HelpCommand.java @@ -64,19 +64,22 @@ public class HelpCommand extends VanillaCommand { ChatPaginator.ChatPage page = ChatPaginator.paginate(topic.getFullText(sender), pageNumber, pageWidth, pageHeight); StringBuilder header = new StringBuilder(); - header.append(ChatColor.GREEN); - header.append("===== Help: "); + header.append(ChatColor.YELLOW); + header.append("--------- "); + header.append(ChatColor.WHITE); + header.append("Help: "); header.append(topic.getName()); header.append(" "); if (page.getTotalPages() > 1) { header.append("("); header.append(page.getPageNumber()); - header.append(" of "); + header.append("/"); header.append(page.getTotalPages()); header.append(") "); } + header.append(ChatColor.YELLOW); for (int i = header.length(); i < ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH; i++) { - header.append("="); + header.append("-"); } sender.sendMessage(header.toString()); diff --git a/src/main/java/org/bukkit/help/IndexHelpTopic.java b/src/main/java/org/bukkit/help/IndexHelpTopic.java index 161e8e81..ce468969 100644 --- a/src/main/java/org/bukkit/help/IndexHelpTopic.java +++ b/src/main/java/org/bukkit/help/IndexHelpTopic.java @@ -64,8 +64,8 @@ public class IndexHelpTopic extends HelpTopic { line.append(topic.getShortText()); String lineStr = line.toString().replace("\n", ". "); - if (sender instanceof Player && lineStr.length() > ChatPaginator.AVERAGE_CHAT_PAGE_WIDTH) { - sb.append(lineStr.substring(0, ChatPaginator.AVERAGE_CHAT_PAGE_WIDTH - 3)); + if (sender instanceof Player && lineStr.length() > ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH) { + sb.append(lineStr.substring(0, ChatPaginator.GUARANTEED_NO_WRAP_CHAT_PAGE_WIDTH - 3)); sb.append("..."); } else { sb.append(lineStr); |