Skip to content
/craftcmd

Disable Phantoms (No Insomnia)

Stop phantoms from spawning when you don't sleep

⚠︎ Awaiting in-game verification for Java 26.2

Prevents phantoms from spawning after players go 3+ days without sleeping. Set back to true to restore them.

/gamerule doInsomnia false
26 characters

How to use

  1. Open chat (T on Java, / on Bedrock).
  2. Paste the command.
  3. Press Enter — phantoms will never spawn.

Related commands

Keep your items when you die instead of dropping them

/gamerule keepInventory true

Freeze time so it's permanently daytime

/gamerule doDaylightCycle false

Stop rain and keep the weather clear

/gamerule doWeatherCycle false

Stop creepers, endermen, and other mobs from changing blocks

/gamerule mobGriefing false

Turn off fall damage

/gamerule fallDamage false

Stop fire from spreading to nearby blocks

/gamerule doFireTick false