Set a block when something happens
Solution 1:
All you need is to tag the player who has the hunger 0 and not act on it. So you would:
- Execute the Say command as a
not tagged
andhungry
player - Execute the tag add
- Remove the tag if he isn't hungry
And they would look like something along the lines of:
/execute as @a[scores={hunger=0},tag=!hungry] run say you cant do that anymore
/execute as @a[scores={hunger=0}] run tag @s add hungry
/execute as @a[scores={hunger=1..}] run tag @s remove hungry
the !
in front of hungry
will negate the tag, so it would be read as "Not hungry"
Also, not that tellraw
would be more appropriate here as say
will be shown to all players.