Wiki 9Minecraft Wiki 9Minecraft

Modify player health and food in commands

Java EditionModGuides 4FAQ 20Mobs 2Related mods 60
DownloadDawn Api

Get the files on 9Minecraft

Contents (4)
  1. Health and Food Commands
  2. Adjusting health
  3. Adjusting food and saturation
  4. Map design tips

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.