/effect
Gives or removes status effects from entities. Effects include potion effects like speed, strength, invisibility, etc.
Syntax
/effect <give|clear> <targets> [<effect>] [<seconds>] [<amplifier>] [<hideParticles>]Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | literal | Required | Whether to give or clear effects. |
| targets | entity | Required | The entity or entities to affect. |
| effect | resource | Optional | The status effect ID (e.g., speed, strength, invisibility). Required for give. |
| seconds | integer | Optional | Duration in seconds (1-1000000). Use infinite for unlimited duration. Defaults to 30. |
| amplifier | integer | Optional | Effect level (0-255). 0 is level I. Defaults to 0. |
| hideParticles | boolean | Optional | Whether to hide the particle effect. Defaults to false. |
Examples
/effect give @s speed 600 1 trueGives yourself Speed II for 10 minutes with hidden particles.
/effect clear @aRemoves all status effects from every player.
/effect give @a night_vision infinite 0Gives all players permanent Night Vision I.
Common Mistakes
- Confusing amplifier 0 with level 0, amplifier 0 corresponds to level I (the first level).
- Using /effect give with the 'infinite' duration on large numbers of entities, the effects persist until explicitly cleared.
Notes
Since 1.19.4, you can use 'infinite' as the duration for effects that never expire. The maximum amplifier is 255 but most effects have no visible benefit past a certain level.
Related Commands
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting