← Back to Command Directory ← Back to Home

/attribute

Reads or modifies entity attributes such as health or movement speed.

Syntax

/attribute <target> <attribute> get
/attribute <target> <attribute> base set <value>

Parameters

NameRequiredDescription
targetYesEntity to inspect.
attributeYesAttribute identifier.
valueNoNew base value.

Examples

/attribute @p minecraft:generic.max_health get
/attribute @p minecraft:generic.max_health base set 40

Notes

Version Differences

Java-only in current editions.

Related Commands