Give and Clear Status Effects on Players and Mobs
The /effect command lets you add or remove status effects on players and other entities in Minecraft Java Edition. You can control which effect is applied, how long it lasts in seconds, how strong it is, and whether the floating particles are visible.
Players and server operators use this command to test mob effects in creative worlds, build custom adventure maps, or remove unwanted effects without needing milk or potions. You need operator permissions (level 2) or cheats enabled in single-player to run it.
/effect clear/effect clear <targets> [<effect>]/effect give <targets> <effect>/effect give <targets> <effect> <seconds>/effect give <targets> <effect> <seconds> <amplifier> [<hideParticles>]/effect give <targets> <effect> infinite/effect give <targets> <effect> infinite <amplifier> [<hideParticles>]/effect clear/effect clear <targets> [<effect>]/effect give <targets> <effect>/effect give <targets> <effect> <seconds>/effect give <targets> <effect> <seconds> <amplifier> [<hideParticles>]/effect give <targets> <effect> infinite/effect give <targets> <effect> infinite <amplifier> [<hideParticles>]| Argument | Type | What it means |
|---|---|---|
<targets> | target selector | Specifies the player or entity to affect using a player name, a UUID, or a target selector like @p, @a, @e, or @s. |
<effect> | registry entry mob effect | Selects the mob effect registry entry to apply or remove. |
<amplifier> | whole number 0 to 255 | Sets the strength level of the effect using a whole number from 0 to 255, where 0 is the base level. |
<hideParticles> | true / false | Controls whether effect particles are hidden by setting it to true or false. |
<seconds> | whole number 1 to 1000000 | Sets how many seconds the effect lasts, using a whole number from 1 to 1000000. |
/effect clearClears every active status effect from the player running the command.
/effect give @s speedGives the command user the Speed effect with the default time and level.
/effect give @p night_vision 300Gives the nearest player Night Vision for 300 seconds.
/effect give @a jump_boost 60 2Gives all players Jump Boost with an amplifier of 2 for 60 seconds.
/effect give @e[type=zombie] strength 120 1 trueGives all zombies Strength with an amplifier of 1 for 120 seconds while hiding their effect particles.
/effect give Steve regeneration infiniteGives the player named Steve an infinite Regeneration effect at the base level.
/effect give @r invisibility infinite 0 trueGives a random player infinite Invisibility at amplifier 0 with no visible particles.
/effect clear @a[distance=..15] poisonRemoves only the Poison effect from all players within 15 blocks.
Measured from the game files of every Java release from 1.13 to 26.3.
In Minecraft Bedrock Edition, the command skips the word give and places the target selector right after /effect, using the syntax /effect <player: target> clear [effect: Effect] or /effect <player: target> <effect: Effect> [seconds: int] [amplifier: int] [hideParticles: Boolean].
In Java Edition 1.19.4 and newer, replace the seconds number with the word infinite, such as /effect give @s night_vision infinite.
Add true at the very end of the command after setting both the duration and the amplifier, like /effect give @s speed 60 0 true.
The <amplifier> argument accepts any whole number from 0 up to a maximum of 255.
/advancement/attribute/damage/defaultgamemode/experience/gamemode/kill/ride/rotate/spawnpoint/spectate/spreadplayers/summon/swing/teleport/tp