
OnlySleep
Skip the night with just one player sleeping — or configure it your way.
Оцените первым
412
7
Список изменений
For the full changelog, visit the Onlysleep Wiki.
[1.3.0] - 2026-07-12
This release makes advertised features work, hardens Folia thread safety, fixes gradual skipping, and closes reload and memory leaks.
Added
- Automatic gamerule management: enabled worlds temporarily use
playersSleepingPercentage: 101so vanilla cannot race the plugin's configured sleep threshold. Each world's original value is restored when management stops, the world unloads, or the plugin disables. - World sleep sounds: configurable sounds now play when a player enters a bed, when weather is cleared, and when the night skip completes.
Changed
- Version compatibility: the release JAR now compiles against Paper 1.20.4 with Java 21 bytecode, while CI compiles and tests every available Paper API target through Paper 26.2 alpha.
- Independent weather controls: rain and thunder can now be cleared separately with
clear-weatherandclear-thunder. - Disabled gamemode filtering: disabled gamemodes are excluded from both the sleeping count and the eligible-player total.
Bug Fixes
- Paper 26.1 startup crash: gamerule management now uses the typed
GameRule.PLAYERS_SLEEPING_PERCENTAGEAPI instead of the removed legacy string lookup. - Safe gamerule reloads: turning off
manage-gameruleor adding a world todisabled-worldsnow restores the original gamerule immediately instead of leaving it at101. - Dynamic world lifecycle: worlds loaded after plugin startup receive the configured override, while unloading worlds are restored and removed from tracked state.
- Boss bar no longer shows "Unknown" when the initiating sleeper logs off mid-skip:
- Replaced the live
Bukkit.getPlayer(uuid)lookup (which returnednullafter the player logged out, falling back to"Unknown") with a per-world snapshot of the initiating player's name, populated at skip-start. The boss bar and deferred title both read from the snapshot, so attribution survives the player going offline.
- Replaced the live
- Sleeping players no longer wake up mid-skip in gradual mode:
- Rewrote
scheduleGradualSkipto keepworld.getTime()parked at the original night value for the entire animation.setTime()is now called exactly once — at the final tick — to snap to the morning target. This prevents vanilla's wake-up threshold (world.getTime() > 23458) from being crossed mid-animation, which previously caused players to be kicked out of bed before the skip's completion effects fired.
- Rewrote
- Listener leak on
/onlysleep reload:AfkTrackerandOfflinePlayerTrackerno longer register duplicate event listeners on every reload (now properly unregistered). OfflinePlayerTrackerstale cache after reload: shutdown now resets the cached count so the "not loaded" sentinel works again.- Off-thread Bukkit calls in update checker: OP update notifications now dispatch to the main/global thread instead of running on the ForkJoinPool.
- Folia crash on
/onlysleep update: replacedBukkit.getScheduler().runTask()(throws on Folia) with theSchedulerAdapterglobal task. - "Good morning" broadcast no longer leaks server-wide: skip/Weather-clearing messages are now scoped to the world that actually skipped, consistent with per-world sleep.
- AFK double-count fixed: with
count-afk-as-sleeping, a just-bed-entered player was counted twice (once in the sleeping set, once as AFK) becauseisSleeping()is still false right after the bed-enter event. Now deduped against the authoritativesleepingPlayersset. - Off-thread
getOfflinePlayers()call: moved from ForkJoinPool to a scheduled global task (thread-safe on all server impls). - Thread-safe state: SleepManager maps and sets now use concurrent collections, preventing corruption on Folia region threads.
Technical Improvements
- Broad server-version support: gamerule handling uses a version-aware typed API across the supported Minecraft 1.20.4–26.2 range.
- Extracted shared night-time bounds (
12542–23458) intoSleepManager.NIGHT_START_TICK/NIGHT_END_TICK+isNight(), reused by the listener and PlaceholderAPI expansion. getSleepingPlayers()returns an unmodifiable view for safe PAPI iteration under concurrency.- Added coverage for gamerule reconciliation, dynamic world lifecycle, disabled-gamemode exclusion, independent weather clearing, and gradual skip state.
Файлы
Onlysleep-1.3.0.jar(88.85 KiB)
ОсновнойМетаданные
Канал релиза
Release
Номер версии
1.3.0
Загрузчики
BukkitFoliaPaperPurpurSpigot
Версии игры
1.20–26.1.2
Загрузок
105
Дата публикации
12.07.2026
