Give or clear an effect: duration, amplifier, hide particles. Java and Bedrock differ in argument order.
The /effect command grants and clears status effects. Java Edition has give and clear subcommands; Bedrock does not use them and is written differently.
Besides duration and level you can hide particles and the HUD indicator, and from 1.19 grant an infinite effect with the value infinite.
Effect level is given as a number where 0 is the first tier. The interface shows “Speed I”, which is a value of zero plus one.
Choose the action: give or clear.
Set the target and the effect.
Set a duration in seconds, or enable the infinite effect.
Optionally hide particles.
Set the duration to 0 seconds, or use the clear command. Zero is the standard way to strip an effect without waiting.
The command value is one lower than the numeral in the HUD. A value of 1 shows as “Speed II”.