Updated:
One player is enough
| Version | Command |
|---|---|
| Java 1.21.11 and later | /gamerule minecraft:players_sleeping_percentage 0 |
| Java 1.17 – 1.21.10 | /gamerule playersSleepingPercentage 0 |
| Bedrock Edition | /gamerule playerssleepingpercentage 0 |
The value is the percentage of players who must be in bed. 0 means a single sleeping player skips the night, 50 means half of the players, and the default 100 means everyone.
Good values
| Value | Effect |
|---|---|
| 0 | Any one player can skip the night |
| 50 | Half of the online players must sleep |
| 100 | Everyone must sleep (default) |
| Over 100 | Sleeping never skips the night |
How the percentage is counted
The game rounds up, and at least one player always has to sleep. With 5 players online and the rule at 50, 2.5 rounds up to 3 sleepers. Players in spectator mode are not counted, and players in the Nether or the End are not counted either, so they do not block the night from passing.
| Players online | Rule value | Sleepers needed |
|---|---|---|
| 4 | 0 | 1 |
| 4 | 25 | 1 |
| 5 | 50 | 3 |
| 10 | 30 | 3 |
Stop phantoms as well
When one player sleeps for everyone, the others never rest and phantoms start to appear for them after three nights. Turn phantoms off if that bothers your group:
| Version | Command |
|---|---|
| Java 1.21.11 and later | /gamerule minecraft:spawn_phantoms false |
| Java 1.21.10 and earlier | /gamerule doInsomnia false |
| Bedrock | /gamerule doinsomnia false |
Skip the night with a command
/time set day
Anyone with command access can skip to morning without a bed. See the time command guide for how Java 26.1 changed what this does to the day count.
Common problems
- "Unknown game rule": Java 1.21.11 renamed it to
players_sleeping_percentage; versions before 1.17 do not have it at all. - The night still does not skip: players in the Nether or the End do not count, but the sleeper must actually be in a bed in the Overworld. Monsters nearby stop players from sleeping.
- Phantoms still appear: phantoms depend on how long each player has not slept. Turn them off with
spawn_phantoms(doInsomniabefore 1.21.11).
Other renamed rules are listed in the gamerule list.
Check your command
The Command Error Doctor checks common syntax mistakes in your browser.