Disable Phantoms (No Insomnia)
Stop phantoms from spawning when you don't sleep
⚠︎ Awaiting in-game verification for Java 26.2Prevents 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 your items when you die instead of dropping them
/gamerule keepInventory trueStop creepers, endermen, and other mobs from changing blocks
/gamerule mobGriefing false