From d76e8af7a0114ecdd5353a602f204253e0c53426 Mon Sep 17 00:00:00 2001 From: jedk1 Date: Fri, 1 Jan 2016 16:51:42 +0000 Subject: [PATCH] Fix to show full commands --- .../projectkorra/projectkorra/command/HelpCommand.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/com/projectkorra/projectkorra/command/HelpCommand.java b/src/com/projectkorra/projectkorra/command/HelpCommand.java index 12be07cf..1e6cadb7 100644 --- a/src/com/projectkorra/projectkorra/command/HelpCommand.java +++ b/src/com/projectkorra/projectkorra/command/HelpCommand.java @@ -51,9 +51,15 @@ public class HelpCommand extends PKCommand { if (isNumeric(arg)) { List strings = new ArrayList(); for (PKCommand command : instances.values()) { - strings.add(command.getProperUse()); + if (!command.getName().equalsIgnoreCase("help")) { + strings.add(command.getProperUse()); + } } - for (String s : getPage(strings, ChatColor.GOLD + "Commands: [optional]", Integer.valueOf(arg), true)) { + Collections.sort(strings); + Collections.reverse(strings); + strings.add(instances.get("help").getProperUse()); + Collections.reverse(strings); + for (String s : getPage(strings, ChatColor.GOLD + "Commands: [optional]", Integer.valueOf(arg), false)) { sender.sendMessage(ChatColor.YELLOW + s); } } else if (instances.keySet().contains(arg.toLowerCase())) {//bending help command