This guide will go over the "playerSleepingPercentage" gamerule, so that you can set the minimum amount of players needed to be in beds to skip nights in your Minecraft world! This includes creating a one player sleep setup where only one player needs to sleep to skip the night on your server.
Giving Yourself Operator Permissions
In order to use the /gamerule command, you'll need to give yourself operator permissions in your server.
In your server console, type "op <yourusername>". You're now op'd! If you are on Bedrock, put your username in quotation marks (I.E op "PatrickFassler")
Setting the Gamerule
From here, you can change the sleep percentage on your server.
This is done using the /gamerule playerSleepingPercentage <value> command.
You will want to replace the "<value>" with any number between 0-100.
Enabling One Player Sleep on a Minecraft Server
To enable one player sleep on your server, you will want to use the command /gamerule playerSleepingPercentage 0 and enter. Now, when anyone on your server sleeps, the night will be skipped.
Setting a Sleep Percentage For Skipping the Night on Your Server
If you want to make it where a certain percentage of players need to sleep to skip the night, you can use this gamerule to do that as well.
For example, /gamerule playerSleepingPercentage 30 makes it to where only 30% or 3 out of every 10 players need to sleep for the night to be skipped.
If you wanted the majority of players to sleep before the night is skipped, you could use /gamerule playerSleepingPercentage 60 this will result in 3 out of every 5 players, or a majority needs to be sleeping in order for the night to be skipped.