Disable Phantoms (No Insomnia)
Stop phantoms from spawning when you don't sleep
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026Prevents phantoms from spawning after players go 3+ days without sleeping. Set back to true to restore them.
/gamerule doInsomnia false26 characters
- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command.
- Press Enter — phantoms will never spawn.
Related commands
Keep Inventory On Death
Keep your items when you die instead of dropping them
Always Day / Stop Time
Freeze time so it's permanently daytime
Clear Weather / Always Sunny
Stop rain and keep the weather clear
Stop Mob Griefing
Stop creepers +2 more
Disable Fall Damage
Turn off fall damage
Turn Off Fire Spread
Stop fire from spreading to nearby blocks