Vivian’s Minecraft ToolsSMALL TOOLS. BIG ADVENTURES.
MINECRAFT JAVA EDITION

How to use effect (Java Edition)

Give a status effect to a player or mob, or clear one effect or all effects.

Basic syntax

/effect give <targets> <effect> [<seconds>|infinite] [<amplifier>] [<hideParticles>]
/effect clear [<targets> [<effect>]]

Arguments in <…> are required, and arguments in […] are optional. Omit the effect to clear all effects. In Java 1.15 and later, omitting the target also defaults to the executor.

ArgumentMeaning
targetsA player name or a selector such as @s, @a, or @e[type=minecraft:zombie].
effectThe status effect ID. For example, minecraft:speed is Speed.
secondsThe duration, from 1 to 1,000,000. Normal effects use seconds and instant effects use ticks. The defaults are 30 seconds or one tick, respectively.
amplifierThe strength is 0–255. 0 is level I, and 1 is level II.
hideParticlesSet to true to hide particles. The default is false.

Examples

Give yourself Speed II for 60 seconds

/effect give @s minecraft:speed 60 1 Open these settings in the generator →

Give yourself permanent Night Vision (Java 1.19.4+)

/effect give @s minecraft:night_vision infinite Open these settings in the generator →

Clear Poison from all players

/effect clear @a minecraft:poison Open these settings in the generator →

Clear all of your effects

/effect clear @s Open these settings in the generator →

Versions and targets

infinite requires Java 1.19.4 or later, and @n, which selects the nearest entity, requires Java 1.21 or later.

In chat, @s is yourself. In a command block, target a player with @p or a player name.

Minecraft Java 1.19.4 release notes

Minecraft Java 1.21 release notes

Make your own command

Open generator →
Ad space (preview)