
OnlySleep
Skip the night with just one player sleeping — or configure it your way.
162
6
For the full changelog, visit the Onlysleep Wiki.
[1.2.0] - 2026-05-21
This release fixes critical bugs across the sleep skip system, AFK detection, config handling, and more.
🐛 Bug Fixes
- Fixed Gradual & Speed Skip Completing Instantly:
- Rewrote the time-advance logic using a distance-traveled approach that correctly handles the night→midnight→morning wrap-around. Previously, both modes behaved identically to instant skip because
newTime >= 0was always true on the first tick.
- Rewrote the time-advance logic using a distance-traveled approach that correctly handles the night→midnight→morning wrap-around. Previously, both modes behaved identically to instant skip because
- Fixed "Good Morning" Message Appearing During Night:
- Deferred all completion effects (sounds, titles, messages, cleanup) into a callback that only fires after the gradual/speed timer actually finishes.
- Speed vs Gradual Now Visually Distinct:
- Speed mode (150 ticks/tick, ~2-3s timelapse) and gradual mode (default 30 ticks/tick, ~6-8s sunrise) now feel genuinely different.
- Fixed Bed Leave Unconditionally Cancelling Skip:
- Previously, any single player leaving their bed cancelled the skip for everyone, even if enough players were still sleeping. Now only cancels when the sleeping count drops below the threshold.
- Fixed Spurious "Cancelled" Message During Gradual Skip:
- When vanilla kicked players out of bed at dawn during a gradual transition, a "Player has stopped sleeping" message appeared right before "Good Morning!". Bed-leave events during active transitions are now ignored.
- Fixed Player Quit Not Rechecking Sleep Status:
- When a non-sleeping player quit, the total player count decreased but the sleep threshold wasn't rechecked. Now properly triggers a skip if the remaining sleepers meet the new lower threshold.
- Fixed CMI AFK Detection Always Failing:
- The CMI integration was calling
getCMIPlayer()on the BukkitPlayerclass (which doesn't have that method). Now uses CMI's correct static API:CMI.getInstance().getPlayerManager().getUser(player).
- The CMI integration was calling
- Fixed Config Values Containing
#Being Stripped:- The
ConfigUpdaternaively stripped everything after#as an inline comment, breaking values likesymbol: "■#test". Now respects quoted strings.
- The
- Fixed Misleading "No one needs to sleep" Message:
- When a skip is already in progress, players now see "The night is already being skipped!" instead of the confusing "No one needs to sleep right now."
- Removed Duplicate "Monsters Nearby" Message:
- Vanilla Minecraft already shows its own "You can't sleep — monsters are nearby" message. The plugin's custom message stacked on top, causing players to see it twice.
🛠️ Technical Improvements
- Gradual/speed timer tasks stored in
skipTasksfor proper mid-transition cancellation. activeTransitionsset tracks worlds currently in mid-transition to prevent spurious cancel/message events.HttpURLConnectioninUpdateCheckernow properly disconnected in afinallyblock (prevents socket leaks on 4-hour recurring checks).- Update checker recurring task is now stored and cancelled on
onDisable(). handleUpdatecommand dispatches async update results back to the main thread.AfkTracker.onPlayerMovenow null-checksevent.getTo()(is@Nullableon Paper).WorldUnloadEventlistener cleans up world state from maps to prevent memory leaks.- Added
SleepManager.cleanupWorld()for explicit per-world state cleanup.
- Fixed Gradual & Speed Skip Completing Instantly:
For the full changelog, visit the Onlysleep Wiki.
[1.1.0] - 2026-05-21
This release brings massive stability, compatibility, and user-experience improvements to Onlysleep.
🚀 Key Improvements & Bug Fixes
- 100% Folia/Paper Multi-threaded Stability:
- Rewrote internal
SchedulerAdapterto resolve reflection lookup issues and method signatures for Folia/Paper multi-threaded environments, preventing region-scheduler crashes. - Redesigned task self-cancellation on Folia to interact directly and safely with the region's returned
ScheduledTaskobject via a thread-safeAtomicReferencewrapper.
- Rewrote internal
- Fixed Operator Sleep Exclusion:
- Removed
onlysleep.exemptfrom the default OP wildcard permission list inplugin.yml. Administrators and OPs now contribute to sleeping by default instead of being permanently exempt, resolving issues where OPs were unable to trigger night skip.
- Removed
- Enhanced Gradual & Speed Transition Modes:
- Resolved a critical bug in
gradualmode where the skip task would continue running and fast-forwarding time all day. - Implemented the
"speed"mode as a rapid timelapse fast-forward (150 ticks per tick) utilizing the self-canceling gradual skip engine.
- Resolved a critical bug in
- PlaceholderAPI Null-Player Safety:
- Re-engineered
SleepPlaceholderExpansionto process all player-independent placeholders first (e.g.version,platform,percentage, and allworld_statistics), making it completely null-player safe when resolved from consoles, plugins, or non-player contexts.
- Re-engineered
- Robust Player Trackers & Initialization:
- Fixed unique player count estimation in
OfflinePlayerTrackerby checking for first-time players (!player.hasPlayedBefore()), preventingrequire-all-players-onlinefrom bypassing offline check. - Integrated direct
PlayerJoinEventandPlayerQuitEventhooks in the built-inAfkTrackerto instantly initialize player activity on join and clean up on quit, solving a bug where silent/idle players could never become AFK.
- Fixed unique player count estimation in
- Strict Bed-Enter Validation:
- Restructured
SleepListenerto only proceed with sleep registrations whenBedEnterResultis explicitlyOK(or custom-handledNOT_SAFE), avoiding false-positive skips caused by other failed bed enter attempts.
- Restructured
- Asynchronous Recurring Update Checker:
- Automatically schedules asynchronous update checks every 4 hours (non-blocking) when automatic checking is enabled, rather than only checking once on startup.
- Smart Configuration Updater:
- Implemented an automatic, stateful configuration merger that updates
config.ymlandmessages.ymlwith new options and comments from the jar resources, fully preserving custom user values, comments, and formatting without overwriting user customization.
- Implemented an automatic, stateful configuration merger that updates
- Safe Update Checks & Null-Safe Commands:
- Fixed unescaped brackets and double quotes in the Update Checker query parameters to comply with modern strict Java runtimes, preventing
URISyntaxException. - Guaranteed null-safe execution of
/onlysleep updateby always instantiatingUpdateCheckeron plugin load, regardless of whether auto-checking is enabled in the config.
- Fixed unescaped brackets and double quotes in the Update Checker query parameters to comply with modern strict Java runtimes, preventing
- 100% Folia/Paper Multi-threaded Stability:
Changelog
[1.0.0] - 2025-06-01
🚀 Major Changes
- Complete rewrite with modular package structure
- Folia support — Full compatibility with Folia's regionized scheduler
- bStats integration — Anonymous usage statistics (ID: 31415)
- Platform detection — Auto-detects Bukkit, Spigot, Paper, Folia
✨ New Features
- Custom skip types — Support for
instant,speed, andgradualnight skips - Title/subtitle support — Configurable titles when night is skipped
- Sound system — Fully configurable sounds for skip events
- AFK detection — EssentialsX and CMI integration
- Disabled worlds — Per-world sleep disabling
- Advanced player filtering — Creative mode, flying, and spectator controls
- Better command system —
/onlysleep status, tab completion improvements - Update checker — Automatic update checks via Modrinth API
- Progress bar customization — Configurable symbols and length
[1.0.0] - Initial Release
- Basic one-player sleep functionality
- Configurable sleep percentage
- Per-world support
- Boss bar display
- Basic command system
Совместимость
Сведения
Лицензия:
Опубликован:1 месяц назад
Обновлён:4 недели назад
ID проекта:



