Always Night (Set Midnight)
Make it night time — and keep it that way. Run: /time set midnight. Jumps the world clock to midnight — the darkest point of the night, when hostile mobs spawn fastest. To lock it there permanently, follow up with /gamerule doDaylightCycle false (the night-time twin of our Always Day page). Great for mob farms, horror maps, or testing light levels. Works on Java 26.2 and Bedrock 26.32. Last verified June 2026.
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026/time set midnight- Java: yes
- Bedrock: yes
- Command block: yes
- Needs cheats / OP: yes
How to use
- Paste the command and press Enter — it's instantly midnight.
- Optional: run /gamerule doDaylightCycle false to freeze time at night forever.
- Undo with /time set day and /gamerule doDaylightCycle true.
Frequently asked questions
Does Always Night (Set Midnight) work on Bedrock Edition?
Yes — the same command works on both Java 26.2 and Bedrock 26.32.
Do you need OP or cheats enabled to use Always Night (Set Midnight)?
Yes — you need operator permissions (OP) on a server, or cheats enabled in your world settings (Java: open to LAN with cheats on; Bedrock: enable cheats in world settings).
Can Always Night (Set Midnight) be used in a command block?
Yes — paste the command into a command block and activate it with a button or redstone signal. Remove the leading slash when using a command block.
Does Always Night (Set Midnight) work in multiplayer?
Yes — the command works the same in multiplayer as in singleplayer. Operator permissions may be required depending on your server settings.
Related commands
Set Time to Day
Change the in-game time to daytime
God Mode (Resistance + Regeneration)
Become nearly invincible
Set Gamemode to Creative
Switch yourself into Creative mode
Kill All Mobs
Instantly remove every mob from the world except players
Add Experience Levels
Give yourself XP levels for enchanting
Set Difficulty to Peaceful
Switch to Peaceful mode so hostile mobs don't spawn
Need something different?
Customize this command in the /execute builder — choose your own options and copy the result.
Learn more
📖Minecraft Commands Not Working — How to Fix
Troubleshooting guide for Minecraft commands that show errors or do nothing