Is there any way that I can use the testfor command to constantly fill up the hunger bar? Is so, please leave the command below.
2 Answers
The best and easiest way to do this would be to give all players the saturation effect constantly, instead of trying to do it only when a player is hungry.
/effect @a 23 1000000 1 1
Which gives all players Saturation I for 1000000 seconds, and hides the particles given off by the effect. The advantage to setting the time to such a large number is so that the effect remaining time displays as xx:xx
to indicate to the player that the saturation effect is permanent, and that they don't need to worry about food.
Run this command on a clock input of some sort and hide command block output with /gamerule commandBlockOutput false
and you're all set.
-
-
@user3487713 The saturation effect fills the player's hunger bar by 1 per tick. It essentially ensures that a player can't get hungry.– Unionhawk ♦Commented Apr 19, 2014 at 20:29
-