The effect command gives a player or a mob a status effect, such as Speed or Night Vision, or takes effects away. You control the effect, how long it lasts and how strong it is. It is useful for adventure maps, builder helpers, minigame rewards and rescuing a player from a bad potion.
Checked against Minecraft Java Edition 26.3, October 2026. The syntax below is the Java Edition one, which is what your server runs.
Run the command
Open the Console tab and type the command with no leading slash. In game, an operator types it with a slash. Whitelist players and set operators shows how to make someone an operator.
The command has two forms:
effect give <targets> <effect> [<seconds>] [<amplifier>] [<hideParticles>]
effect clear [<targets>] [<effect>]- targets is a player name, or a selector such as
@afor every player. A named player has to be online. - effect is the effect's ID, such as
speedorminecraft:speed. - seconds is how long it lasts. If you leave it off, the default is 30 seconds. The most you can set is 1,000,000.
- amplifier is the level, counted from 0. So 0 is level I, 1 is level II and 2 is level III. The range is 0 to 255, and the default is 0.
- hideParticles is
trueorfalse. Withtruethe swirling particles and the HUD icon are hidden. The default isfalse.
Examples
Speed II for 60 seconds on one player:
effect give Alex minecraft:speed 60 1Night Vision that never runs out, with the particles hidden, for everyone online:
effect give @a minecraft:night_vision infinite 0 trueUse the word infinite in place of the seconds for an effect that does not expire. It shows as an infinity symbol in the player's effect list.
Remove only Speed from one player, then remove every effect from everyone:
effect clear Alex minecraft:speed
effect clear @aEffect IDs worth knowing
The game lists more, including negative ones such as slowness, weakness, poison and levitation.
How effects stack
If the target already has the same effect, a new one only takes hold if it is stronger or lasts longer. When it does not, the command replies that it was unable to apply the effect because the target is either immune or has something stronger. Clear the old effect first if you want to replace a strong one with a weaker one.
For the instant effects instant_health, instant_damage and saturation, the number you give is read in game ticks rather than seconds. A tick is a twentieth of a second.
If it does not work
- "No player was found". The player has to be online, and the name must be spelled exactly.
- The effect does not apply. The target is immune, or already has a stronger version, as described above.
- "Can't find element". The effect ID is misspelled. IDs use underscores, such as
jump_boost, and no spaces.
Related guides

Set a world border on your Minecraft server
Use the Minecraft worldborder command in the Console to set the size and center, move it over time, tune the damage and warning, and cover each dimension.
3 min read
Change game rules on your Minecraft server
Run the Minecraft gamerule command in the Console, with a table of the old and new rule names after the 1.21.11 rename and the settings that moved into rules.
3 min read
Summon a Minecraft mob with no AI using commands
Use the NoAI tag to summon a Minecraft mob that stands still, freeze one that already exists, add display tags and switch its AI back on.
4 min read
