/attribute Command in Minecraft Java Edition

Read and Change Entity Attributes in Minecraft

Java EditionPlayers & EntitiesPermission: Level 2Added in 1.16

The /attribute command in Minecraft Java Edition lets you read and change the attribute values of a single player or entity. You can check total attribute values, adjust base values directly, reset base values, or attach custom attribute modifiers.

Players and map makers use this command to test entity stats, customize player abilities, or apply named modifiers that can be added and removed individually during gameplay. Running this command requires permission level 2 (Operator status, or cheats turned on in single-player).

Syntax (Java 26.3, 9 forms)

  1. /attribute <target> <attribute> base get [<scale>]
  2. /attribute <target> <attribute> base reset
  3. /attribute <target> <attribute> base set <value>
  4. /attribute <target> <attribute> get [<scale>]
  5. /attribute <target> <attribute> modifier add <id> <value> add_multiplied_base
  6. /attribute <target> <attribute> modifier add <id> <value> add_multiplied_total
  7. /attribute <target> <attribute> modifier add <id> <value> add_value
  8. /attribute <target> <attribute> modifier remove <id>
  9. /attribute <target> <attribute> modifier value get <id> [<scale>]

The forms you will use most

/attribute <target> <attribute> get [<scale>]
Reads the total value of the attribute on the target, optionally multiplied by a scale number.
/attribute <target> <attribute> base get [<scale>]
Reads only the base value of the attribute on the target before any modifiers are applied.
/attribute <target> <attribute> base set <value>
Changes the base value of the target's attribute to a specific decimal number.
/attribute <target> <attribute> base reset
Resets the base value of the target's attribute back to its default state.
/attribute <target> <attribute> modifier add <id> <value> add_value
Adds a new modifier with a specific resource ID that directly adds the given value to the attribute.
/attribute <target> <attribute> modifier add <id> <value> add_multiplied_base
Adds a new modifier with a specific resource ID that multiplies the base value and adds the result.
/attribute <target> <attribute> modifier add <id> <value> add_multiplied_total
Adds a new modifier with a specific resource ID that multiplies the total attribute value.
/attribute <target> <attribute> modifier remove <id>
Removes an existing attribute modifier that matches the given resource ID from the target.

Arguments

ArgumentTypeWhat it means
<target>target selector
one target
A player name, a UUID, or a target selector (such as @p or @s) that selects a single target.
<attribute>registry entry
attribute
The registry entry ID for the specific attribute you want to read or change.
<scale>decimal numberAn optional decimal number used to multiply the result when reading an attribute or modifier value.
<value>decimal numberA decimal number representing the new base amount or the strength of a modifier.
<id>resource IDA namespaced resource ID (such as custom:boost) used to identify a specific attribute modifier.

Examples

Version history

Measured from the game files of every Java release from 1.13 to 26.3.

  1. 1.21.4 Syntax changed.
    + /attribute <target> <attribute> base reset
  2. 1.21 Syntax changed.
    + /attribute <target> <attribute> modifier add <id> <value> add_multiplied_base+ /attribute <target> <attribute> modifier add <id> <value> add_multiplied_total+ /attribute <target> <attribute> modifier add <id> <value> add_value+ /attribute <target> <attribute> modifier remove <id>+ /attribute <target> <attribute> modifier value get <id> [<scale>]− /attribute <target> <attribute> modifier add <uuid> <name> <value> add_multiplied_base− /attribute <target> <attribute> modifier add <uuid> <name> <value> add_multiplied_total− /attribute <target> <attribute> modifier add <uuid> <name> <value> add_value− /attribute <target> <attribute> modifier remove <uuid>− /attribute <target> <attribute> modifier value get <uuid> [<scale>]
  3. 1.20.5 Syntax changed.
    + /attribute <target> <attribute> modifier add <uuid> <name> <value> add_multiplied_base+ /attribute <target> <attribute> modifier add <uuid> <name> <value> add_multiplied_total+ /attribute <target> <attribute> modifier add <uuid> <name> <value> add_value− /attribute <target> <attribute> modifier add <uuid> <name> <value> add− /attribute <target> <attribute> modifier add <uuid> <name> <value> multiply− /attribute <target> <attribute> modifier add <uuid> <name> <value> multiply_base
  4. 1.16 Command added.

Tips

Common mistakes

Java vs Bedrock

Minecraft Bedrock Edition has no command with the name /attribute. This command is exclusive to Minecraft Java Edition, where it was first added in version 1.16.

FAQ

When was the /attribute command added to Minecraft?

The /attribute command was added to Minecraft Java Edition in version 1.16.

How do I reset an attribute base value to normal?

In Java Edition 1.21.4 and newer, run /attribute <target> <attribute> base reset to restore the base value of an attribute.

Why do UUIDs no longer work when adding attribute modifiers?

Starting in Java Edition 1.21, the syntax changed to use a single namespaced resource ID (<id>) instead of a <uuid> and <name> pair when adding or removing modifiers.

Related commands

/advancement/damage/defaultgamemode/effect/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp