mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-30 20:37:50 +01:00
Fix viaversion list command
This commit is contained in:
parent
1fa7211cf0
commit
4431ca63c2
@ -30,12 +30,9 @@ public class ListSubCmd extends ViaSubCommand {
|
||||
Map<Integer, Set<String>> 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<String>()).add(p.getName());
|
||||
|
||||
if (!playerVersions.containsKey(playerVersion))
|
||||
playerVersions.put(playerVersion, new HashSet<String>());
|
||||
playerVersions.get(playerVersion).add(p.getName());
|
||||
}
|
||||
Map<Integer, Set<String>> sorted = new TreeMap<>(playerVersions);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user