Dawn Api Wiki › Guides › Modify player health and food in commands
Modify player health and food in commands
Health and Food Commands
Dawn API provides dedicated commands for adjusting player stats, which is cleaner than using attribute commands for health adjustments.
Adjusting health
Add health points:
`
/health add @s 5
`
Set health to a specific value:
`
/health set @s 10
`
Check current health:
`
/health query @s
`
Adjusting food and saturation
Modify food level:
`
/foodbar set @s food 20
`
Adjust saturation:
`
/foodbar add @s saturation 5
`
Query food status:
`
/foodbar query @s food
`
Map design tips
Use these commands in adventure maps to create custom hunger mechanics, healing stations, or damage sequences. They're more intuitive than NBT editing and work reliably in command chains. Combine with repeating command blocks for gradual health drain or regeneration effects.