Flags - mrgeneralq/sleep-most GitHub Wiki

Introduction to flags

What are flags

Sleep most is using flags for world specific configurations. Everything that is a flag is a property that can be configured per world. This is different for configurations such as messages which will be the same for all worlds.

How to use flags

Whenever the world is enabled, all flags will automatically be prepared in the config file for that world. In order to configure the flags, you can use the following command:

/sm setflag <flagName> <flagValue>

NOTE: It is not recommended to make manual changes to the config files for setting the flags.

Overview flags

Below you can find a full list of all available flags and the expected value or format. All the flag values can be configured by using the command

/sm setflag <flagName> <flagValue>
Flag Name Expected value Description
percentage-required decimal Percentage required to skip the night for that world
mob-no-target true | false When true, mobs will not attack you when in the bed
use-exempt true | false When set to true, players with the sleepmost.exempt permission will not be counted as required to sleep
use-afk true | false When set to true, AFK players will not be counted as required to sleep
prevent-sleep true | false When set to true, players cannot sleep in that world
prevent-phantom true |false Prevent phantoms from spawning and reset the counter after sleeping
nightcycle-animation true | false Show animation of time speeding up after sleeping
storm-sleep true | false Allow players to sleep during thunderstorms
calculation-method percentage | players Set the type of calculating when players required to sleep is met.
players-required number Set the number of players required to sleep if the calculation method is set to players
skip-delay number Set the amount in seconds between skipping night/storm and the player going to sleep
heal true | false Heal the player after sleeping
feed true | false Feed the player after sleeping
exempt-below-y number All players below the given Y-axis (miners) will not be included as sleepers. -1 = disabled
exempt-creative true | false When set to true, creative players wil not be taken into account for the amount of required sleeping players
exempt-spectator true | false When set to true, spectator players wil not be taken into account for the amount of required sleeping players
allow-cmd-sleep true | false When enabled, the player can use the /sm sleep command
clock-animation true | false When enabled, the clock animation will play if the nightcylce-animation is enabled
use-bossbar true | false When enabled, a bossbar will be visible to show how many players are asleep (appears when first person goes to sleep
use-title-night-skipped true|false When enabled, titles will be visible when the night is skipped
use-title-storm-skipped true|false When enabled, titles will be visible when the storm is skipped
use-sound-night-skipped true|false When enabled, a sound will play when the night is skipped
use-sound-storm-skipped true|false When enabled, a sound will play when the storm is skipped
⚠️ **GitHub.com Fallback** ⚠️