Functionality: This plugin simply sets up some tasks to pass time, pick a message, and deliver the message to all relevant players.
Through configuration options, you can add any number of sleep messages, randomize the message per-player, deliver to and sync with other worlds or dimensions, add placeholders for world names, reset the TIME_SINCE_REST statistic for all relevant players, set a bed cooldown to prevent sleep message spam, change how fast the night passes while sleeping, or even shorten the range of time when sleep is allowed.
If there's effectively only one player online to see the message, the message is skipped. OnePlayerSleep is compatible with plugins like EssentialsX and SuperVanish that setSleepingIgnored as part of /afk and /vanish.
Features:
Configurable & Expandable list of sleep messages, including chance per message
Bukkit color code support
PlaceholderAPI support
Globally updated phantom spawning flags
Set the range of time that sleep is allowed
currently capped by vanilla sleep times in the overworld
Async randomization and messaging
Configurable night passing animation (tickrate and time per tick)
Configurable multi-world time and weather synchronization
Configurable multi-dimension time synchronization
Configurable nether/end sleeping
Configurable afk/vanish detection and skipping
todo list:
overworld sleeping outside of vanilla times
auto-add worlds by name to config files for easier world-name placeholder settings
world-specific config options, e.g. different time settings per world
explicit world sync groups instead of a true/false setting for all worlds