How to control hunger?

I'm trying to create a system that only allows players to jump 3 times before their hunger bar goes down enough to prevent sprinting. Each jump will slightly deplete the hunger. Between each jump, the hunger bar will regenerate after a few seconds.

Is this possible considering that the hunger bar depletes gradually rather than instantly?

I'm trying to create a system that only allows players to jump 3 times before their hunger bar goes down enough to prevent sprinting. Each jump will slightly deplete the hunger. Between each jump, the hunger bar will regenerate after a few seconds.

Is this possible considering that the hunger bar depletes gradually rather than instantly?

Hunger bars can only deplete gradually. Not to mention that the Saturation level messes up the Hunger effect as well.

Rollback Post to RevisionRollBack

Advertisement Board

1. New minigame for Christmas! (Yes it's over, I know...) Check it out!

2. If you found my command solutions helpful, try to make my work worthwhile by crediting me. However, if you are to credit me, let me do it by:

Joining the map server or giving me a download link to add stuff.

This is mainly because I don't want some simple signs mentioning my name or my stupid head sticking to the wall.