From Minecraft Wiki
Lists players on the server.
- Java Edition
- Bedrock Edition
listd [details: string](hidden)
- Shows the names of all currently-connected players (the same can be achieved when pressing Tab ↹).
- uuids (BE: details: string) (optional)
- If 'uuids' is specified, player UUIDs will be shown alongside names.
- In Bedrock Edition, it must be one of:
- Success Conditions
- Always succeeds, even in a command block.