Read and Change Entity Attributes in Minecraft
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).
/attribute <target> <attribute> base get [<scale>]/attribute <target> <attribute> base reset/attribute <target> <attribute> base set <value>/attribute <target> <attribute> get [<scale>]/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> get [<scale>]/attribute <target> <attribute> base get [<scale>]/attribute <target> <attribute> base set <value>/attribute <target> <attribute> base reset/attribute <target> <attribute> modifier add <id> <value> add_value/attribute <target> <attribute> modifier add <id> <value> add_multiplied_base/attribute <target> <attribute> modifier add <id> <value> add_multiplied_total/attribute <target> <attribute> modifier remove <id>| Argument | Type | What 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 number | An optional decimal number used to multiply the result when reading an attribute or modifier value. |
<value> | decimal number | A decimal number representing the new base amount or the strength of a modifier. |
<id> | resource ID | A namespaced resource ID (such as custom:boost) used to identify a specific attribute modifier. |
/attribute @s minecraft:max_health getChecks the total maximum health of the player or entity running the command.
/attribute @p minecraft:movement_speed base get 100Gets the base movement speed of the nearest player and multiplies the result by 100.
/attribute Steve minecraft:attack_damage base set 5.5Sets the base attack damage of the player named Steve to 5.5.
/attribute @e[type=minecraft:zombie,limit=1] minecraft:armor base resetResets the base armor attribute of a single zombie back to its default value.
/attribute @a[limit=1] minecraft:scale modifier add custom:giant 1.25 add_valueAdds 1.25 to the scale attribute of one player using a modifier named custom:giant.
/attribute @e[type=minecraft:skeleton,limit=1] minecraft:follow_range modifier add arena:sight 0.5 add_multiplied_baseApplies a modifier named arena:sight that increases a single skeleton's follow range by 50 percent of its base value.
/attribute Alex minecraft:knockback_resistance modifier add game:steady 0.2 add_multiplied_totalAdds a total-multiplying modifier named game:steady with a value of 0.2 to the player Alex's knockback resistance.
/attribute @r minecraft:jump_strength modifier value get event:leap 10Reads the value of the event:leap modifier on a random player's jump strength, scaled by 10.
/attribute @e[type=minecraft:villager,limit=1] minecraft:gravity modifier remove map:floatRemoves the modifier with the ID map:float from a single villager's gravity attribute.
Measured from the game files of every Java release from 1.13 to 26.3.
+ /attribute <target> <attribute> base reset+ /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>]+ /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_baseMinecraft 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.
The /attribute command was added to Minecraft Java Edition in version 1.16.
In Java Edition 1.21.4 and newer, run /attribute <target> <attribute> base reset to restore the base value of an attribute.
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.
/advancement/damage/defaultgamemode/effect/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp