Measure Minecraft game time?

Ap
- in Worlds
3

Is there a way to measure in Minecraft how long a player was / is in the world?

I saw that it could work with / scoreboard. But I didn't find a suitable tutorial online.

Can someone help me there?

Ma

I once saw someone do that with an item disappearance mechanism. A dropper lets an item fall onto a pressure plate, which emits a redstone signal. After 5 minutes, when the item disappears, you know that 5 minutes have passed

Ex

Unfortunately I don't have a Mc at the moment, but I'll try it from memory.

/ scoreboard objectives add PlayTime minecraft.custom: minecraft.play_one_minute "PlayTime"

/ scoreboard objectives setdisplay sidebar

Ap

Thank you that helped me a lot