How can I stop a specific player from being able to sleep?

Thoughts I had so far:

  • Loop command to constamtly set the "SleepTimer" data value to 0 I don't know if it is possible to edit playerdata

  • Summoning an invisible unkillable mob with no AI to their location I don't think this would work when travelling dimension or in a server with warps

Does anyone know of a way to do this? Any help is much appreciated!

Continue to help post