Skip to content
WikilyWIKILY
All games23 Wikis · pick your game
Commands and cheatsAll commands

Switch game

23 Wikis · pick your game
/effect

Command

/effect

Gives status effects such as Speed or Regeneration to entities, or removes them.

Syntax

/effect clear [<targets> [<effect>]]
/effect give <targets> <effect>
/effect give <targets> <effect> infinite [<amplifier> [<hideParticles>]]
/effect give <targets> <effect> <seconds> [<amplifier> [<hideParticles>]]

Arguments

ArgumentKind of valueWhat to type
<targets>Target selectorThe entities to affect. Only living entities such as players and mobs can have effects. One or more entities.
<effect>Game idThe effect id, for example minecraft:speed, minecraft:regeneration, minecraft:night_vision, or minecraft:instant_health. The id of an effect.
<amplifier>Whole numberThe strength of the effect, from 0 to 255. 0 is level I. Defaults to 0.
<hideParticles>True or falsetrue to hide the effect's particles, false to show them. Defaults to false.
<seconds>Whole numberHow long the effect lasts, in seconds. A whole number from 1 to 1000000. Defaults to 30 seconds. From 1 to 1e+06.

Details

Permission level2: operators, worlds with cheats on, command blocks and functions
Works inSingleplayer with cheats enabled and multiplayer servers. Needs permission level 2 (gamemasters): server operators, players with cheats, command blocks, and functions can all run it.
ResultReports which effect was applied or removed and for whom. The number /execute store saves is the number of entities that received the effect or had effects removed.
giveApplies an effect to the targets. Without a duration it lasts 30 seconds. Instant effects such as Instant Health are applied once.
give ... infiniteApplies the effect with no time limit. It stays until it is removed.
clearWithout arguments, removes all effects from yourself. With targets, removes all effects from them. With an effect as well, removes only that effect.
DurationThe duration is given in seconds, from 1 to 1000000. For instant effects the number is counted in ticks instead.
AmplifierThe amplifier is the effect level minus 1, from 0 to 255. 0 is level I, 1 is level II. Defaults to 0.
ParticlesSet hideParticles to true to apply the effect without showing particles around the entity. Defaults to false.
Failure reasonsgive fails if no target could receive the effect, because the targets are immune, are not living entities, or already have a stronger version. clear fails if no target had an effect to remove.

Examples

/effect give @s minecraft:speed

Gives you Speed for 30 seconds.

/effect give @s minecraft:night_vision infinite

Gives you Night Vision until it is removed.

/effect give @a minecraft:regeneration 60 1

Gives all players Regeneration II for 60 seconds.

/effect give @s minecraft:invisibility 120 0 true

Makes you invisible for 2 minutes without particles.

/effect clear @s minecraft:poison

Removes Poison from you.

/effect clear @a

Removes all effects from every player.

Join the creator communityThe people who build the Minecraft Java Edition wiki are on our Discord. Ask questions or suggest pages.Join Discord (opens Discord in a new tab)