Tags
Creators
Details
Licensed MIT
Published 3 months ago
Updated 4 hours ago
All versions
1.3.0
Release
OnlySleep 1.3.02 months ago 443
Uploaded by
Compatibility
Minecraft: Java Edition
26.2
26.1.x
1.21.x
1.20.x
Platforms
Bukkit
Folia
Paper
Purpur
Spigot
Changes
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.
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:Tr6srgFS:NKwBM2Tj"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:Tr6srgFS:NKwBM2Tj"
}

