OnePlayerSleep icon

OnePlayerSleep -----

Conditionally pass the night/storm if a player sleeps, based on the OnePlayerSleep datapack



OnePlayerSleep
lightweight, configurable spigot plugin inspired by the OnePlayerSleep datapack

Tired of waiting for everyone else to sleep? Now you can just get in bed to pass the night and clear those nasty thunderstorms! (as long as there are no objections)

This plugin was developed to add life to community-oriented minecraft servers.

Annotation 2020-03-27 121454.png

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 passed per tick)
  • Configurable multi-world and multi-dimension time synchronization
  • Configurable per-world messaging
  • Enable/disable nether/end sleeping
  • Enable/disable afk/vanish detection
  • todo list:
    • overworld sleeping outside of vanilla times
    • permission for running sleep task without a bed
Functionality:
This plugin simply sets up some tasks to pass time, pick a message, and deliver the message to all relevant players.


OnePlayerSleep Wiki

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.


Configurable, Randomized Sleep Messages

With this plugin, we can add any number of messages with custom text, custom hover text, custom wakeup text, and even bukkit color codes!

2020-03-27_12.18.58.png

Each message has a configurable chance to be selected, out of the sum of all message chance values.

Configurable Sleep Functionality
Sleep announcements are not given to players in other worlds by default, but configuration allows us to share time and make announcements to other worlds, other dimensions, or both:

Capture.PNG

as well as reformat the messages in messages.yml.

Async Randomization
The random selection of a message is run asynchronously to maintain performance on the main thread.

PAPI Support
This plugin supports PlaceholderAPI placeholders in all messages as well as having a few of its own placeholders.

Two placeholders are added for use with PAPI ( wiki):
  • %oneplayersleep_sleeping_player_count% - number of players currently asleep
  • %oneplayersleep_total_player_count% - number of players not ignored by the plugin

bStats
[​IMG]
Resource Information
Author:
----------
Total Downloads: 440,391
First Release: Mar 26, 2020
Last Update: Feb 7, 2023
Category: ---------------
All-Time Rating:
8 ratings
Find more info at github.com...
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings