Updated:
Basic effect command
A common Java Edition example is /effect give @p minecraft:invisibility 60 0 true. The target, effect ID, duration, amplifier and particle option control the result.
Common effect choices
Use the generator to choose the target, duration and effect ID for a concrete task. For example, night vision helps visibility in dark spaces, while resistance and speed have different gameplay purposes.
When it does not work
Check the edition, effect ID, target selector and duration. Bedrock and Java command formats are not always identical.
Example: give night vision for 30 seconds
/effect give @p minecraft:night_vision 30 0 trueFor modern Java Edition, the target is the nearest player, the duration is 30 seconds, amplifier 0 means level I, and true hides particles. An amplifier of 1 is level II. A duration of 30 means seconds for this command form, not game ticks.
Remove an effect and narrow the cause of an error
/effect clear @pThis clears all active effects from the target in Java Edition, so do not use it on another player without intending to remove their effects. For Bedrock Edition, inspect the edition-specific output because the command form and available effects differ. If a named effect is rejected, confirm its exact ID and whether it exists in that version.
Using effects in command blocks
Test a fixed duration from chat first. A repeating command block can reapply a potion effect continuously, which may make it appear impossible to remove. Stop the repeating block before testing effect clear. If a target selector is empty, no player can receive the effect.
Java and Bedrock syntax side by side
| Task | Java | Bedrock |
|---|---|---|
| Give Speed II for 60 s | /effect give @p minecraft:speed 60 1 true | /effect @p speed 60 1 true |
| Clear all effects | /effect clear @p | /effect @p clear |
| Clear one effect | /effect clear @p minecraft:speed | Check the in-game suggestions for your version |
Java needs the word give or clear straight after /effect; Bedrock does not. Pasting a Java command into Bedrock (or the reverse) is the most common reason for a syntax error.
Infinite duration
/effect give @p minecraft:night_vision infinite 0 true
Since Java 1.19.4 you can write infinite instead of a number of seconds. Recent Bedrock versions accept it too; check whether it appears in the command suggestions.
Useful effect IDs
| Effect | ID | Typical use |
|---|---|---|
| Speed | speed | Races and parkour |
| Night Vision | night_vision | Building underground |
| Resistance | resistance | Level V (amplifier 4) blocks almost all damage |
| Jump Boost | jump_boost | Parkour maps |
| Invisibility | invisibility | Hide-and-seek games |
| Saturation | saturation | Keep hunger full in lobbies |
FAQ
Why is the level one higher than I typed?
The amplifier starts at 0, so 0 is level I and 1 is level II.
Can I give effects to mobs?
Yes, use an entity selector such as @e[type=zombie,sort=nearest,limit=1]. Undead mobs are healed by Instant Damage and hurt by Instant Health.