> For the full changelog, visit the [Onlysleep Wiki](https://github.com/DemonZ-Development/Onlysleep/wiki/Changelog).
---
## [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: 101` so 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-weather` and `clear-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_PERCENTAGE` API instead of the removed legacy string lookup.
- **Safe gamerule reloads**: turning off `manage-gamerule` or adding a world to `disabled-worlds` now restores the original gamerule immediately instead of leaving it at `101`.
- **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 returned `null` after 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.
- **Sleeping players no longer wake up mid-skip in gradual mode**:
- Rewrote `scheduleGradualSkip` to keep `world.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.
- **Listener leak on `/onlysleep reload`**: `AfkTracker` and `OfflinePlayerTracker` no longer register duplicate event listeners on every reload (now properly unregistered).
- **`OfflinePlayerTracker` stale 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`**: replaced `Bukkit.getScheduler().runTask()` (throws on Folia) with the `SchedulerAdapter` global 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) because `isSleeping()` is still false right after the bed-enter event. Now deduped against the authoritative `sleepingPlayers` set.
- **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`) into `SleepManager.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.
---
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }