diff --git a/src/main/java/us/myles/ViaVersion/commands/defaultsubs/ListSubCmd.java b/src/main/java/us/myles/ViaVersion/commands/defaultsubs/ListSubCmd.java index 06b4f8df7..289ebbac7 100644 --- a/src/main/java/us/myles/ViaVersion/commands/defaultsubs/ListSubCmd.java +++ b/src/main/java/us/myles/ViaVersion/commands/defaultsubs/ListSubCmd.java @@ -30,12 +30,9 @@ public class ListSubCmd extends ViaSubCommand { Map> playerVersions = new HashMap<>(); for (Player p : Bukkit.getOnlinePlayers()) { int playerVersion = ViaVersion.getInstance().getPlayerVersion(p); - if (playerVersions.containsKey(playerVersion)) { - playerVersions.get(playerVersion).add(p.getName()); - continue; - } - playerVersions.put(playerVersion, new HashSet()).add(p.getName()); - + if (!playerVersions.containsKey(playerVersion)) + playerVersions.put(playerVersion, new HashSet()); + playerVersions.get(playerVersion).add(p.getName()); } Map> sorted = new TreeMap<>(playerVersions);