Improve various small code quality issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-01-16 03:53:51 +01:00
parent d315b3f38a
commit 546637c188
11 changed files with 46 additions and 44 deletions

View File

@@ -11,10 +11,7 @@ import wtf.beatrice.hidekobot.commands.base.Alias;
import wtf.beatrice.hidekobot.objects.commands.CommandCategory;
import wtf.beatrice.hidekobot.objects.commands.MessageCommand;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.*;
public class HelpCommand implements MessageCommand
{
@@ -82,10 +79,11 @@ public class HelpCommand implements MessageCommand
"\nYou will find a list of commands organized in categories below.",
false);
for(CommandCategory category : commandCategories.keySet())
for(Map.Entry<CommandCategory, LinkedList<MessageCommand>> entry : commandCategories.entrySet())
{
StringBuilder commandsList = new StringBuilder();
LinkedList<MessageCommand> commandsOfThisCategory = commandCategories.get(category);
CommandCategory category = entry.getKey();
LinkedList<MessageCommand> commandsOfThisCategory = entry.getValue();
for(int pos = 0; pos < commandsOfThisCategory.size(); pos++)
{