All commands
📊
Advanced

/attribute

Change stats like speed, health, or attack damage on entities.

Try in Simulator

At a glance

Syntax

Syntax
/attribute <target> <attribute> base set <value>
commandtargetcoordsvaluerequiredoptional

See it

What it does

Speed78%
Max Health92%
Attack64%
Entity attributes are tuned

Anatomy

Every part, explained

  1. 1
    /attributeCommandRequired

    Reads or changes an attribute.

  2. 2
    <target>TargetRequired

    A single entity to modify.

  3. 3
    <attribute>AttributeRequired

    Which stat, like generic.movement_speed.

  4. 4
    base set <value>ValueRequired

    Set the base value to a number.

Your turn

Try it yourself

Playground
6 tokens · press Enter to run

Copy & paste

Examples

/attribute @s minecraft:generic.movement_speed base set 0.2

Set your walking speed.

/attribute @s minecraft:generic.max_health base set 40

Double your max health.

/attribute @s minecraft:generic.attack_damage base get

Read your attack damage.

Avoid these

Common mistakes

/attribute @s movement_speed base set 0.2
/attribute @s minecraft:generic.movement_speed base set 0.2

Use the full attribute ID with namespace.

/attribute @a generic.max_health base set 40
/attribute @s minecraft:generic.max_health base set 40

Attribute targets a single entity, not @a.

Keep going

Related commands