
Command
/effect
Gives status effects such as Speed or Regeneration to entities, or removes them.
| /effect clear [<targets> [<effect>]] |
| /effect give <targets> <effect> |
| /effect give <targets> <effect> infinite [<amplifier> [<hideParticles>]] |
| /effect give <targets> <effect> <seconds> [<amplifier> [<hideParticles>]] |
| Argument | Kind of value | What to type |
|---|---|---|
| <targets> | Target selector | The entities to affect. Only living entities such as players and mobs can have effects. One or more entities. |
| <effect> | Game id | The effect id, for example minecraft:speed, minecraft:regeneration, minecraft:night_vision, or minecraft:instant_health. The id of an effect. |
| <amplifier> | Whole number | The strength of the effect, from 0 to 255. 0 is level I. Defaults to 0. |
| <hideParticles> | True or false | true to hide the effect's particles, false to show them. Defaults to false. |
| <seconds> | Whole number | How long the effect lasts, in seconds. A whole number from 1 to 1000000. Defaults to 30 seconds. From 1 to 1e+06. |
| Permission level | 2: operators, worlds with cheats on, command blocks and functions |
| Works in | Singleplayer with cheats enabled and multiplayer servers. Needs permission level 2 (gamemasters): server operators, players with cheats, command blocks, and functions can all run it. |
| Result | Reports which effect was applied or removed and for whom. The number /execute store saves is the number of entities that received the effect or had effects removed. |
| give | Applies an effect to the targets. Without a duration it lasts 30 seconds. Instant effects such as Instant Health are applied once. |
| give ... infinite | Applies the effect with no time limit. It stays until it is removed. |
| clear | Without arguments, removes all effects from yourself. With targets, removes all effects from them. With an effect as well, removes only that effect. |
| Duration | The duration is given in seconds, from 1 to 1000000. For instant effects the number is counted in ticks instead. |
| Amplifier | The amplifier is the effect level minus 1, from 0 to 255. 0 is level I, 1 is level II. Defaults to 0. |
| Particles | Set hideParticles to true to apply the effect without showing particles around the entity. Defaults to false. |
| Failure reasons | give fails if no target could receive the effect, because the targets are immune, are not living entities, or already have a stronger version. clear fails if no target had an effect to remove. |
/effect give @s minecraft:speedGives you Speed for 30 seconds.
/effect give @s minecraft:night_vision infiniteGives you Night Vision until it is removed.
/effect give @a minecraft:regeneration 60 1Gives all players Regeneration II for 60 seconds.
/effect give @s minecraft:invisibility 120 0 trueMakes you invisible for 2 minutes without particles.
/effect clear @s minecraft:poisonRemoves Poison from you.
/effect clear @aRemoves all effects from every player.





