How to count achievements after the game started?

I have a Minecraft server with a couple friends on it. I was thinking of using the scoreboard function to track achievements so we could know each other's progression in the game. Problem being that the server has already been on for quite awhile and people have accumulated achievements already.

Is there a command in game to list number of achievements obtained or perhaps in the statistics of a player? This is then used to update the scoreboard with the starting values and then further track from then on.

MC version: 1.7.10 Modpack: FTB Resurrection


The scoreboard command is big and complicated. Go look at the wiki article for it first.

So, the first thing you need to do is set up a scoreboard objective for each achievement:

/scoreboard objective add acquireIron achievement.acquireIron
/scoreboard objective add bakeBread achievement.bakeBread
...

See the wiki for each of the achievements in vanilla Minecraft. Note that Overpowered probably isn't available, since it was added in 1.8, and some mods can add other achievements.

You'll also need a a scoreboard objective to tally all the other achievements:

/scoreboard objective add tally dummy Achievments Taken

Now you'll need a clock, probably a fill clock, although not necessarily a 20Hz fill clock. You'll need a clock that can trigger over 30 command blocks.

There's probably a better way to do the next step on a brand new server, but since that's not the case, I won't go into it. The first command that needs to be run on each clock cycle is a reset of everyone's tally score:

scoreboard players set @a tally 0

Next we need to increment the tally score for each achievement taken:

scoreboard players add @a[score_acquireIron_min=1] tally 1
scoreboard players add @a[score_bakeBread_min=1] tally 1
...

That's it for commands that need to be run on a clock. The only important thing is that the tally score gets reset first, and that every achievement score is checked before the tally score gets reset again.

Finally, you need some way to display this to the server. I would suggest the tab list:

/scoreboard objective setdisplay list tally

Disclaimer: I haven't tested this myself, as I'm away from my desktop computer and a Minecraft installation. I'm pretty sure I haven't missed anything obvious, so this should work fine.