Use the /effect command and status effects
Give or clear status effects with /effect: duration, level, infinite effects, hidden particles, useful effect IDs and fixes for common errors.
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.
Was this guide helpful?
Related guides
Minecraft chunk loaders: how they work
What keeps chunks loaded on current Minecraft: forceload, portals and ender pearls, and the pause-when-empty setting that can stop farms running.
Minecraft banners: crafting and patterns
Craft banners and a loom, add up to six pattern layers, and find or craft the ten banner pattern items in Java Edition, with each recipe and source.
Minecraft bamboo guide: farming and uses
Where bamboo generates, how to plant and farm it, what it crafts into, including scaffolding, planks and sticks, its fuel value and how pandas use it.
