Short answer: the game counts everything each player does and saves it in the world's stats folder (players/stats since Java 26.1), one <uuid>.json file per player. Open the server or world folder in the editor, click Stats, and you get a ranked table of every player, ready to copy into Discord.
What is in a stats file
It is plain JSON grouped by category: minecraft:custom for general counters, minecraft:mined, minecraft:crafted, minecraft:used, minecraft:killed and more for each block, item or mob. The ones people compare most:
| Stat | Where | Unit |
|---|---|---|
| Play time | minecraft:custom → minecraft:play_time (play_one_minute before 1.17) | ticks, 72,000 per hour |
| Deaths | minecraft:custom → minecraft:deaths | count |
| Mobs killed | minecraft:custom → minecraft:mob_kills | count |
| Blocks mined | sum of everything in minecraft:mined | count |
| Distance on foot | walk_one_cm + sprint_one_cm + crouch_one_cm | centimetres |
Build the leaderboard
- In Chrome or Edge, click Open folder in the editor and choose the server folder. Names come from
usercache.json, so pick the folder that contains it. For a hosted server, mount it over SFTP. - Click Stats. Every player with a stats file is listed, with play time, deaths, mobs killed, blocks mined, distance on foot and the date the file was last saved.
- Choose what to rank by. The preview on the right updates.
- Copy for Discord copies a ready-to-paste top 5 (or everyone) in Discord's formatting. Download CSV gives the whole table for a spreadsheet.
Nothing is written: the stats window only reads files, so it is safe to use while the server runs. The numbers are as fresh as the last save, which happens every few minutes and when a player leaves.
Why a player is missing or shows a UUID
- No stats file yet: the player joined only briefly, before the first save.
- A UUID instead of a name: the player hasn't joined for a long time and dropped out of
usercache.json. - Two lines for one person: the server switched between online and offline mode, which gives players a new UUID. See switching modes without losing progress to merge them.