/effect give ... (All the selected entities meets one or more of the following conditions: the entity is immune to the specified effect. the entity already has a status effect with the same id and the same "hideParticles" value, but the new effect doesn't have a higher amplifier or a longer duration. the entity already has a status effect with the same id and the same "hideParticles" value, and the new effect has a lower amplifier and a longer duration.)
minecraft — Console Commands
Successful
Syntax
All the selected entities meets one or more of the following conditions:
the entity is immune to the specified effect.
the entity already has a status effect with the same id and the same "hideParticles" value, but the new effect doesn't have a higher amplifier or a longer duration.
the entity already has a status effect with the same id and the same "hideParticles" value, and the new effect has a lower amplifier and a longer duration.
Example
All the selected entities meets one or more of the following conditions:
the entity is immune to the specified effect.
the entity already has a status effect with the same id and the same "hideParticles" value, but the new effect doesn't have a higher amplifier or a longer duration.
the entity already has a status effect with the same id and the same "hideParticles" value, and the new effect has a lower amplifier and a longer duration.
💡 Notes
Found on Commands/effect