OGTOOLS

Minecraft /attribute command

Permanently sets base values like max health, speed and attack damage.

🧍 Player commands Operator (level 2) Needs cheats enabled Java Edition 26.3

Syntax

/attribute <target> <attribute> get [<scale>]
/attribute <target> <attribute> base set <value>
/attribute <target> <attribute> modifier add <id> <value> <operation>

Parts in square brackets are optional, parts in angle brackets are required. You do not type the brackets: Put your own value in their place.

Arguments

ArgumentWhat it does
<attribute> minecraft:max_health, minecraft:movement_speed, minecraft:attack_damage and so on.
base set Writes the base value directly.
modifier Defines a named modifier that is added on top of the base value.

Examples

/attribute @s minecraft:max_health base set 40

Raises your health to 20 hearts.

/attribute @s minecraft:movement_speed base set 0.2

Doubles your walking speed.

Good to know

  • After raising health, you need the instant_health effect or food to fill it up.
  • Attribute names were simplified in 1.21.2: minecraft:generic.max_health is now minecraft:max_health.

How do I run this command?

Press T in game to open chat (or press / directly), type the command and press Enter. While typing, Tab completes the options. This command counts as a cheat: It needs cheats enabled in a singleplayer world, and operator permission on a server (operator (level 2)).

Related commands

🧍 More Player commands

Another tool Minecraft crafting recipes Would rather make the item than give it with a command? See the recipe on the 3x3 grid.

Minecraft is a product of Mojang Studios. This tool is an independent helper made for players and is not affiliated with Mojang or Microsoft.