Reads or modifies entity attributes such as health or movement speed.
/attribute <target> <attribute> get /attribute <target> <attribute> base set <value>
| Name | Required | Description |
|---|---|---|
| target | Yes | Entity to inspect. |
| attribute | Yes | Attribute identifier. |
| value | No | New base value. |
/attribute @p minecraft:generic.max_health get /attribute @p minecraft:generic.max_health base set 40
Java-only in current editions.