From e54813304414434e527a675901980fa10eaa4423 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Sat, 15 Sep 2018 17:25:44 -0500 Subject: [PATCH] Fix group list priority --- src/main/java/xyz/etztech/qol/commands/ListCommand.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/xyz/etztech/qol/commands/ListCommand.java b/src/main/java/xyz/etztech/qol/commands/ListCommand.java index da5c8ea..6d10fab 100644 --- a/src/main/java/xyz/etztech/qol/commands/ListCommand.java +++ b/src/main/java/xyz/etztech/qol/commands/ListCommand.java @@ -24,11 +24,14 @@ public class ListCommand implements CommandExecutor { Map> list = new HashMap<>(); List groups = plugin.getConfig().getStringList("list"); + for (String group : groups) { + list.put(group, new ArrayList<>()); + } for (Player player : Bukkit.getServer().getOnlinePlayers()) { for (String group : groups) { if (player.hasPermission("qol.list." + group)) { - List names = list.containsKey(group) ? list.get(group) : new ArrayList(); + List names = list.get(group); names.add(player.getName()); list.put(group, names); break;