Articles on: Plugin Setup

How to install and use BetterSleeping4 [Java]

BetterSleeping4 is a sleeping plugin that's used to customize your sleeping experience to the maximum. From disabling phantoms, to syncing minecraft days with timezones, there's a lot of fun things to do with this plugin, so let's set it up!


Download the plugin from here
After you download the plugin, drop it into your plugins folder. Restart the server and it should be applied!


Most of the configuration can be done within the config files or within the game! Open your config file at /plugins/BetterSleeping4/config.yml


Change the core settings of the plugin here

You can enable/disable bossbar/action bar messages by setting their options to true/false
You can disable phantoms by setting the phantoms option to false. Phantoms would no longer generate beyond the expected time point
You can also enable particle animations if you want your players to have particles around them while they are sleeping


Change effects and commands run in this file

Change the effects players get when they are sleeping/just got out of sleep. You can type in the minecraft effect type, along with level and duration. This can be useful when you want players to be immune from someone trying to kill a player in sleep, for example.
You can also specify commands to run by un-commenting the lines as shown in the picture. You can run multiple commands for people sleeping/who just got out of sleep


Set what users in gamemode you want to have the plugin bypass. You may also give the user the permission bettersleeping.bypass to bypass it.


You can change what the plugin messages would look like here, for the best customization


You can configure plugin hooks here, and what they would do

If you use essentials, you can toggle the essentials_afk_ignored option to enable/disable ignoring users who are in afk
You may also set the minimum time ( in seconds ) a player needs to be AFK in order to be ignored
You can also have vanished players be immune to the plugin effects by enabling the option
If you use GSit, you can enable/disable the plugin from thinking when a player is sitting/laying, they are sleeping


Adjust sleeping preferences here

You can utilise the sleeping percentage count in this config to set a minimum % of players that need to sleep in order to skip night.

A gamerule in server software has already been introduced for this, it's best to use that. /gamerule playersSleepingPercentage 10 would set 10% of players needed to skip night

You can specify how many seconds night should last if night has to be skipped. Setting it to 0 would skip night fully like the normal game, setting it to something like 5 would make it look like the night becomes day in a timelapse :P
You can also customize how long you want a day and night to last with day_length and night_length settings. This is useful in case you want a horror server where it's day only for 30 seconds, but night for the rest!
You can also change per-world settings in the world_settings option

Commands & Permissions

You can ask players anonymously to sleep to skip the day with /bs shout

Everyone has this by default. The permission would be bettersleeping.shout in case you want to remove it

You can consider yourself to be sleeping without actually being in bed with the /bs sleep command. Requires permission bettersleeping.sleepcommand
You can see what buffs you get when sleeping/just getting out of sleeping with the command /bs buffs. Defaults to everyone, permission is bettersleeping.buffs

That's about it! Allowing for true control over players sleeping experience, this plugin is a great one to use for multiple use cases
Article made by vijaypondini#0001 ( ID 631466030023049217 )

Updated on: 14/06/2022

Was this article helpful?

Share your feedback


Thank you!