The /attribute Command: How to Increase a Player's Health, Speed, or Damage Without Mods
What the /attribute command is and why you need itAttributes are numeric characteristics that define a player's capabilities. Health shows…
What the /attribute command is and why you need it
Attributes are numeric characteristics that define a player's capabilities. Health shows how much damage you can take before dying. Speed affects movement quickness. Damage determines attack strength.
The /attribute command changes these values directly, without using potions, enchantments, or items. It's suitable for creating custom game modes, testing balance, or making progression easier.
Difference from mods: the command is built into the game, requires no additional software installation, and works on any server where commands are enabled.
How to use the /attribute command
Open the chat with the T or / key, type the command, and press Enter. The command is applied immediately after execution.
Basic syntax:
/attribute @s <attribute> base set <value>
@s- applies to the player themselves (can be replaced with@pfor the nearest player or a player's name)<attribute>- the name of the attribute (for example,minecraft:generic.max_health)<value>- the number to set
How to increase a player's maximum health
A player's default health is 20 hearts (40 points). The command lets you set any value.
Examples:
Set health to 100 points (50 hearts):
/attribute @s minecraft:generic.max_health base set 100
Set health to 200 points (100 hearts):
/attribute @s minecraft:generic.max_health base set 200
After running the command, the health bar updates automatically. If health was below the new maximum, it stays at its current level.
How to increase movement speed
The default movement speed is 0.1. Increasing this value speeds up walking, running, and flying in creative mode.
Examples:
Double the speed (0.2):
/attribute @s minecraft:generic.movement_speed base set 0.2
Triple the speed (0.3):
/attribute @s minecraft:generic.movement_speed base set 0.3
Very high speed (0.5):
/attribute @s minecraft:generic.movement_speed base set 0.5
Important: Values above 0.5 make control difficult. It's recommended to use values from 0.1 to 0.4.
How to increase attack damage
The default damage of bare hands is 1 point. The command changes the base damage of all the player's attacks, including punches and any weapon.
Examples:
Damage of 10 points (kills most mobs in one hit):
/attribute @s minecraft:generic.attack_damage base set 10
Damage of 20 points:
/attribute @s minecraft:generic.attack_damage base set 20
Increased damage stacks with the weapon's damage. If the base damage is 10 and the sword deals 7, the total damage will be 17 points.
How to change other players' attributes
Instead of @s, you can specify another player:
@p- the nearest player@a- all players on the serverPlayerName- a specific player by name
Examples:
Change the nearest player's health:
/attribute @p minecraft:generic.max_health base set 100
Change the speed of all players:
/attribute @a minecraft:generic.movement_speed base set 0.2
How to reset attributes to their default values
To return to default values, set the base parameters back to their originals.
Commands for resetting:
Health (20 points):
/attribute @s minecraft:generic.max_health base set 20
Speed (0.1):
/attribute @s minecraft:generic.movement_speed base set 0.1
Damage (1 point):
/attribute @s minecraft:generic.attack_damage base set 1
What other attributes can be changed
Besides health, speed, and damage, other attributes are available.
List of main attributes:
minecraft:generic.max_health- maximum health.minecraft:generic.movement_speed- movement speed.minecraft:generic.attack_damage- attack damage.minecraft:generic.attack_speed- attack speed (hits per second).minecraft:generic.armor- protection from damage.minecraft:generic.armor_toughness- armor toughness (reduces the effectiveness of heavy damage).minecraft:generic.knockback_resistance- knockback resistance (0.0–1.0, where 1.0 is full immunity to knockback).minecraft:generic.luck- luck (affects drops and loot quality).minecraft:generic.flying_speed- flying speed in creative mode.minecraft:generic.follow_range- follow range for the player (for mobs).
Usage examples:
Increase protection:
/attribute @s minecraft:generic.armor base set 20
Make immune to knockback:
/attribute @s minecraft:generic.knockback_resistance base set 1.0
Increase luck:
/attribute @s minecraft:generic.luck base set 10
Limitations and usage notes
Permission requirements:
The /attribute command works only for players with operator permissions or in creative mode. In survival mode without operator permissions, the command is unavailable.
Minecraft versions:
The command is available from version 1.16. In earlier versions, a different syntax is used or the command is absent. In versions 1.13–1.15, attributes are changed via the /entitydata command or NBT tags.
Saving changes:
Attribute changes are saved together with the world. After restarting the server or leaving the game, the values remain. To reset, you need to run the commands to set the default values manually.
Multiplayer:
On a server, each player can change their own attributes if they have operator permissions. An administrator can change other players' attributes by specifying their name instead of @s.
Effect on achievements:
Changing attributes does not block earning achievements. The game considers this a legal way to change parameters.
Common errors and their solutions
Error: "Unknown attribute"
Cause: an incorrect attribute name or a typo.
Solution: check the spelling. The name must start with minecraft:generic. and contain the correct attribute name.
Error: "No entity was found"
Cause: an incorrect target selector.
Solution: use @s for yourself, @p for the nearest player, or specify the exact player name.
Error: "You do not have permission to use this command"
Cause: lack of operator permissions.
Solution: enable cheats in the world settings (for single-player) or obtain operator permissions on the server.
The attribute is not applied
Cause: incorrect operation syntax or a value outside the allowed range.
Solution: check the command syntax. For speed, use values from 0.0 to 1.0. For health, use positive numbers. For knockback resistance, use values from 0.0 to 1.0.
Changes disappear after death
Cause: some servers or plugins reset attributes on respawn.
Solution: create the command in a command block with a respawn trigger, or use a plugin for persistently applying attributes.
Too high a speed makes the game unplayable
Cause: speed values above 0.5 cause physics problems.
Solution: use values from 0.1 to 0.4. If the speed is already set too high, set the value to 0.1 via the command.
No comments yet. Be the first to share your thoughts.