Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Fix viaversion list command
Dieser Commit ist enthalten in:
Ursprung
1fa7211cf0
Commit
4431ca63c2
@ -30,12 +30,9 @@ public class ListSubCmd extends ViaSubCommand {
|
|||||||
Map<Integer, Set<String>> playerVersions = new HashMap<>();
|
Map<Integer, Set<String>> playerVersions = new HashMap<>();
|
||||||
for (Player p : Bukkit.getOnlinePlayers()) {
|
for (Player p : Bukkit.getOnlinePlayers()) {
|
||||||
int playerVersion = ViaVersion.getInstance().getPlayerVersion(p);
|
int playerVersion = ViaVersion.getInstance().getPlayerVersion(p);
|
||||||
if (playerVersions.containsKey(playerVersion)) {
|
if (!playerVersions.containsKey(playerVersion))
|
||||||
playerVersions.get(playerVersion).add(p.getName());
|
playerVersions.put(playerVersion, new HashSet<String>());
|
||||||
continue;
|
playerVersions.get(playerVersion).add(p.getName());
|
||||||
}
|
|
||||||
playerVersions.put(playerVersion, new HashSet<String>()).add(p.getName());
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Map<Integer, Set<String>> sorted = new TreeMap<>(playerVersions);
|
Map<Integer, Set<String>> sorted = new TreeMap<>(playerVersions);
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren