Commands/effect

Add or remove status effects on players and other entities.

Syntax

 * Java Edition
 * Removes an effect.
 * Gives an effect.
 * Gives an effect.
 * Gives an effect.


 * Bedrock Edition
 * Removes all effects.
 * Gives or removes an effect.
 * Gives or removes an effect.
 * Gives or removes an effect.

Arguments

 * Specifies the target(s). $$, if not specified, defaults to the player who executes the command.


 * Specifies the effect to be added or removed.


 * Specifies the effect's duration in seconds (or in gameticks for,  , and  ). If not specified, defaults to 30 seconds (or 1 gameticks for  ,  , and  ).
 * $$, it must be between 1 and 2147483647 (inclusive).


 * Specifies the number of additional levels to add to the effect. If not specified, defaults to 0. Note that the first tier of a status effect (e.g. Regeneration I) is 0, so the second tier, for example Regeneration II, would be specified by an amplifier level of 1.
 * And it must be between 0 and 255 (inclusive).


 * Specifies whether the particles and the HUD indicator of the status effect should be hidden. If not specified, defaults to.

Note

 * If a target already has the status effect, a new status effect with the same amplifier overrides the old duration only if it is longer, but a new status effect with a higher duration overrides any previous duration.

or
 * To grant a Speed III effect to the nearest player for 60 seconds:  or
 * To clear any Haste effects from all players:  or
 * To clear all effects from all zombies:  or

History
Befehl/effect Команды консоли/effect Команди консолі/effect 命令/effect