-
Bug
-
Resolution: Fixed
-
1.14.4, 19w35a, 19w38b, 19w39a, 19w41a, 19w42a, 19w44a, 19w45a, 19w46a, 19w46b, 1.15 Pre-Release 2, 1.15 Pre-release 3
-
Confirmed
-
Commands
-
Important
Steps to reproduce:
- Run the commands
/tag @s add a /tag @s add b /tag @s add p /tag @s add q /tag @s list
- The feedback is
Player has 4 tags: p, a, q, b
but it should be ordered alphabetically
Player has 4 tags: a, b, p, q
Other affected commands: /scoreboard players list and /team list <team>
Code analysis (official mappings)
public static Component formatAndSortList(Collection in, Function formatter) { if (in.isEmpty()) { return new TextComponent(""); } else if (in.size() == 1) { return (Component)formatter.apply(in.iterator().next()); } else { ArrayList sorted = Lists.newArrayList(in); sorted.sort(Comparable::compareTo); return formatList(in, formatter); } }
The method formatAndSortList in ComponentUtils ignores the sorting result.