Disable sleeping

Started by Trehmor on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Disable sleeping
Fri, 07/31/2020 - 17:37 (edited)

I wan to know if there is any way to disable player from sleeping, like when there are monsters nearby, or interrupt the sleeping process. 

Edited by Trehmor on Fri, 07/31/2020 - 17:37
Joined Oct 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I solved this by damaging…
Thu, 10/24/2024 - 15:45

I solved this by damaging player by 0.01 with the type "Out_of_world", because this type damages player, when he is falling under bedrock, even in creative.
0.01 too small to affect health, yet enough to activate trigger of waking up.