All commands
๐Ÿ“Š
AdvancedJava โœ“Bedrock -

/attribute

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

๐ŸชจThis command is Java Edition only - Bedrock has no direct equivalent.

Overview

What is the /attribute command?

The /attribute command reads and changes an entity's attributes โ€” base stats like max health, movement speed, attack damage, armor and knockback resistance. You can set the base value or apply temporary, stackable modifiers.

It's how you make a super-fast player, a tanky boss mob, or fine-tune balance in custom fights and minigames.

When to use it: Use /attribute to change core stats like max health, speed or attack damage on players and mobs.

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.

Good to know

Frequently asked questions

How do you change a mob's health with a command?
Run /attribute <target> minecraft:generic.max_health base set <value>, then heal the entity to apply the new maximum.
How do you make a player move faster?
Use /attribute @s minecraft:generic.movement_speed base set <value> โ€” small numbers go a long way, so increase gently.
What's the difference between base and a modifier?
The base is the core value; modifiers add temporary, named, stackable changes on top and can be removed later without losing the base.

Keep going

Related commands