How to make a rejoin system score in Minecraft 1.16.5?

I'm trying to make a Rejoin "system" where, if you rejoin the server, you get a score like it used to be in 1.12.2, with the command:

/scoreboard objectives add [NAME] stat.leaveGame 

but I'm not exactly sure right now if it works in 1.16.5 or how it works, since I only switched shortly to 1.16.5

Any help?


Solution 1:

All scoreboard criteria related to stats have been changed to minecraft.custom. It would look like this:

/scoreboard objectives add <name> minecraft.custom:minecraft.leave_game