OnePlayerSleep icon

OnePlayerSleep -----

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




configure how long clear weather will last.

does not override longer times from commands.

Optionally sleep during rain at any time.

changed sleep fail messages to actionbars, replacing the vanilla messages
----------, Feb 7, 2023

fixed an extraneous configuration check causing null messages
----------, Jan 29, 2023

prevent world time overflow/loopback by stopping at no later than the configured stop time instead of incrementing past it.
----------, Jan 27, 2023

fixes cancel message sometimes triggered at dawn
also manually clear weather again when exiting bed without a cancel message
----------, Jan 20, 2023

fix cancel message on weather clear
shorten clear weather times to vanilla
fix world id lookup on some wakeups
----------, Jan 14, 2023

colors in help menu
fixed sleep test command for console
----------, Dec 29, 2022

cancel message will not pop up during a wakeup task, after sleep completes, or after night is skipped by the base game.
----------, Nov 18, 2022

fixed colors in console
added cancel string to messages.yml
added some miscellaneous api functions
----------, Nov 14, 2022

fix wrong api-version in plugin.yml
----------, Nov 21, 2021

AAAAAAAAAAAAA

but it works

rewrote messaging function to support hex colors in sleep messages.
[​IMG]
----------, Sep 4, 2021

switched from HashMap to ConcurrentHashmap to address a bug.
----------, Aug 18, 2021

1-line fix for message lookup
----------, Jul 29, 2021

fixed plugin not resetting its internal message list on plugin reload command
updated world name placeholder
----------, Jul 21, 2021

made it refresh worlds.yml if it finds a world that it doesn't know about,
added checks in a bunch of places to handle bad inputs
cleaned up unused or duplicate code in a few events
fixed string replacement screwing up text.
----------, Jul 21, 2021

fixed using the wrong config value for time increment
----------, Jul 19, 2021

quick fix for afk/vanished players unexpectedly announcing their presence to the world.
----------, Jul 18, 2021

  • added a few logs for bad inputs
  • added lang.yml to soften the logs, allow other languages
  • moved command response config options from messages.yml to lang.yml
  • moved start/stop times to world settings
  • fixed config value lookups on join/leave events
  • miscellaneous behavior fixes, like bed cooldown timing
includes config file updates, so check your file changes after updating
(2nd upload because of a typo)
----------, Jul 18, 2021

fixed papi version number
fixed dimension placeholder check on load
----------, Jul 14, 2021

Since the weather changed, here's another fix
----------, Jul 14, 2021

fixed missing sleepingIgnored settings in config.yml
fixed some references to old settings, replaced with references to worlds.yml
fixed color on a console message
----------, Jul 14, 2021

setting cancelBedExplode to true for a world should cancel bed explosions in that world
----------, Jul 14, 2021

compiled with java 8, spigot 1.13.2 api for spigot 1.13-1.16

still needs testing with older versions
----------, Jul 13, 2021

Spigot/Paper 1.17
Java 16

probably has a few kinks to work out. Post any new or unresolved bugs on the github issues page.

has new config files

Added console command functionality, using config options for server name and world
Added minimum player count setting. Set to 1 if you want a single active player to generate sleep messages.
Added worlds.cfg, autofilled with world names and default values at plugin enable
Added message lists, selected by world

Rather than just per-world time vs global time, synchronization is now managed on a case-by-case basis in worlds.cfg. This allowed arbitrary grouping and optimization of world selection. I also included environment placeholders for all worlds of an environment.
----------, Jul 13, 2021

fixes an error on /reload command because I can't stop people from using it.
----------, Feb 13, 2021

was getting an error on wakeup when not using placeholderAPI.

also added a bit of handling in case of bad message names in wakeup commands
----------, Feb 6, 2021

split up and renamed config options and rewrote some code to consider them.
optimized iterators
optimized world name compare

You'll need to redo config if you're updating.
----------, Jan 26, 2021

don't do nether/end bed explosion if doOtherDimensions is true
do bed explosions otherwise
bed explosion during daytime bugfix

also added time response and fixed a missing color code check
----------, Jan 22, 2021

user has some sort of issue with messages not happening. I cannot replicate the problem, but I can make a guess that the issue is a bad sleepingIgnored setting from elsewhere.

Setting useSleepingIgnored to false may resolve the problem.
----------, Jan 11, 2021

just placeholderapi updates
----------, Jan 2, 2021

added bstats

cleaned up some leftover code
----------, Apr 18, 2020

bugfix for previous version
----------, Apr 11, 2020

  • clicking a message now reacts to that message (instead of the last message sent), making message tests easier
  • can do /sleep wakeup [message] and tab for a message name
  • optimized player counts for this plugin's placeholders
  • made it work better with plugin managers and with /reload
----------, Apr 11, 2020

  • can now do /sleep test to test a random message
  • can do /sleep test [message] to test a specific message
  • can click on the message to cancel time passing and see its response
  • can do /sleep test [messages] to test a set of messages, though only the last message displayed will have its response used.
  • made the "badArgs" response configurable to improve language compatibility
  • fixed tab completion for partial commands so that only the matching subset is given.
----------, Apr 10, 2020

update config version on config update
----------, Apr 6, 2020

  • if doOtherWorlds is true, sync weather changes
  • updated weather duration
  • minor bugfix
----------, Apr 6, 2020

Added softdepend on PlaceholderAPI so you can use those placeholders if you have the plugin.

Added world list so that we can add world name placeholders as-needed.

messages.yml has been updated accordingly, so make sure to copy your changes.

note: the player sleeping will be different from the player calling wakeup, so the placeholder results will be different.
----------, Apr 4, 2020

moved a line of code
fixed "no players sleeping" bug
fixed getting out of bed cancelling tasks that should continue
fixed world placeholders
(consolidated bug fixes into new version)
----------, Mar 31, 2020

moved a line of code
----------, Mar 31, 2020

patching a bug
----------, Mar 31, 2020

decoupled wakeup from sleep.see
fixed extra randomization
fixed wakeup
----------, Mar 31, 2020

consolidated multi-world config options into doOtherWorlds and doOtherDimensions.
changed a bunch of code for world handling.
updated config.yml
updated messages.yml
fixed rain not clearing on wakeup with high stopTime values
----------, Mar 29, 2020

java isn't handling loops correctly
----------, Mar 28, 2020

when doing global sleep, the message shouldn't kick off twice
----------, Mar 28, 2020

added configurable cooldown in ms for entering a bed
fixed some message issues
----------, Mar 28, 2020

fixed per-player messages
fixed config overwrite
set default values for message stuff
----------, Mar 28, 2020

added option to reset all players' sleep statistics
improved handling of config updates
----------, Mar 28, 2020

added globalNightSkip config option to sync worlds on sleep
updated sleep event logic a bit
----------, Mar 28, 2020

all messages have the same cantWakeup value for now but it can be changed on a per-message basis
----------, Mar 28, 2020

made sleep.ignore false by default for testing purposes

added a message for sleep.bypass cases. I'll make it configurable later.
----------, Mar 27, 2020

tested as far back as 1.11
----------, Mar 27, 2020

Added help command & function
Simplified permission lookup
----------, Mar 27, 2020

redid some of the wakeup logic

added sleep.bypass and sleep.ignore checks
----------, Mar 27, 2020

removed extra imports and debug lines
----------, Mar 26, 2020

fixed permission issue
----------, Mar 26, 2020

Resource Information
Author:
----------
Total Downloads: 440,435
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