spawn_phantoms
booleanJava 26.2 onlyControls whether phantoms spawn when players haven't slept for several in-game days. When false, phantoms never spawn from insomnia.
Enable spawn_phantoms
Phantoms spawn above players who haven't slept for 3+ in-game days, attacking at night.
Java
/gamerule spawn_phantoms trueDisable spawn_phantoms
No phantom spawns from insomnia. Players can go without sleeping indefinitely with no aerial threat.
Java
/gamerule spawn_phantoms falseDefault: true. Restore with /gamerule spawn_phantoms true
What spawn_phantoms does
Controls whether phantoms spawn when players haven't slept for several in-game days. When false, phantoms never spawn from insomnia.
spawn_phantoms is a Java Edition-only gamerule and is not available in Bedrock.
Frequently asked questions
- Is spawn_phantoms available in Bedrock?
- Not under this name. Bedrock uses /gamerule doinsomnia false (all lowercase). The Java name changed to spawn_phantoms in snapshot 25w44a.
- Will phantoms that already spawned despawn?
- No — already-spawned phantoms remain. The rule only prevents new phantom spawns from insomnia.
- What happened to doInsomnia?
- Renamed to spawn_phantoms in Java snapshot 25w44a. The Bedrock equivalent is /gamerule doinsomnia false.