Updated:
Darkness: effect ID and commands
The effect ID for Darkness is minecraft:darkness. Makes the screen pulse dark, as near a warden. It was added in Java 1.19.
Basic data
| Name | Darkness |
|---|---|
| ID (Java Edition) | minecraft:darkness |
| Type | Harmful effect |
| Java versions | Java 1.19 and later |
| Bedrock 26.52 | Same ID works (tested on a server) |
Commands you can copy
Java Edition
Apply for 30 seconds
/effect give @p minecraft:darkness 30 0Apply level II for 60 seconds
/effect give @p minecraft:darkness 60 1Apply with particles hidden
/effect give @p minecraft:darkness 60 0 trueApply with no time limit (Java 1.19.4+)
/effect give @p minecraft:darkness infinite 0 trueRemove only this effect
/effect clear @p minecraft:darknessBedrock Edition
Apply for 30 seconds
/effect @p darkness 30 0Apply with particles hidden
/effect @p darkness 60 0 trueRemove all effects
/effect @p clearVersion notes
It was added in Java 1.19. Older versions report that the ID is unknown.
Java Edition writes /effect give; Bedrock writes /effect without give. infinite in place of seconds works in Java 1.19.4 and later.
Questions
What is the ID for Darkness?
It is minecraft:darkness. In commands you can also write darkness without minecraft:.
How do I set the level?
The number after the seconds is the strength: 0 is level I, 1 is level II, up to 255.
How do I hide the particles?
Add true at the end of the command to hide the particles.