COWMODSКаталог модов

OnlySleep

Skip the night with just one player sleeping or configure it your way.

4 тыс.8обновлён 18 окт. 2026 г.
Механики игрыУправлениеУтилиты

Описание

Onlysleep

Onlysleep

One player sleeps. Everyone wakes up.

Onlysleep lets your server skip the night without waiting for every player to find a bed. One sleeper is enough by default, but you can require any percentage from 0 to 100. Install the JAR, restart the server, and the default configuration is ready to use.


Features

  • One-player sleep by default, with configurable percentage thresholds
  • Separate sleep counts for each world
  • Independent controls for clearing rain and thunder
  • Boss bar, action bar, title, and progress-bar feedback
  • Configurable sounds for bed entry and successful night skips
  • Built-in AFK tracking, plus EssentialsX and CMI support
  • Filters for spectators, creative players, flying players, game modes, and exempt permissions
  • Automatic handling of the playersSleepingPercentage gamerule
  • PlaceholderAPI support for sleep, world, and status data
  • Optional update checks and anonymous bStats metrics

Installation

Installation Steps

Requirements: Minecraft 26.3 and Java 25 or newer. Onlysleep works on its own; PlaceholderAPI is optional.


Commands

Commands Preview

Aliases: /os, /sleep


Permissions

PermissionDefaultDescription
onlysleep.*OPAll permissions
onlysleep.commandEveryoneUse commands
onlysleep.infoOPView plugin info
onlysleep.reloadOPReload config
onlysleep.statusOPView status
onlysleep.exemptNoneExcluded from sleep (operators sleep by default)
onlysleep.updateOPUpdate alerts

Configuration

You can use the defaults as-is. The main setting is sleep-percentage in config.yml:

  • 0 = one player sleeps, everyone wakes up
  • 50 = half the server needs to be in bed
  • 100 = everyone has to sleep

Set per-world-sleep: false if you want global counting across all worlds.

See config.yml for every option and messages.yml for message customization.


PlaceholderAPI

PlaceholderAPI Preview

If you have PlaceholderAPI installed, these placeholders are available:

PlaceholderDescription
%onlysleep_sleeping%Sleeping players in the player's world
%onlysleep_required%Players needed to skip the night
%onlysleep_percentage%Configured sleep percentage
%onlysleep_total%Total eligible players in the world
%onlysleep_progress%% of required sleepers achieved (0-100)
%onlysleep_progress_bar%Visual progress bar
%onlysleep_sleeping_names%Names of sleeping players
%onlysleep_status%"Sleeping" or "Awake"
%onlysleep_is_sleeping%true/false
%onlysleep_is_night%true/false if it's night
%onlysleep_is_sleepable%true/false if night/storm
%onlysleep_skipping%true/false if a skip is scheduled
%onlysleep_enabled%true/false if sleeping is enabled in the world
%onlysleep_afk%true/false if the player is AFK
%onlysleep_version%Plugin version
%onlysleep_platform%Server platform (Folia/Paper/Spigot/Bukkit)
%onlysleep_world_sleeping_<world>%Sleeping count in a specific world
%onlysleep_world_required_<world>%Required count in a specific world
%onlysleep_world_total_<world>%Total eligible in a specific world

Building

git clone https://github.com/DemonZ-Development/Onlysleep.git
cd Onlysleep
./gradlew clean build

The compiled JAR is in build/libs/.

bStats

bStats

Onlysleep uses bStats for anonymous usage metrics. You can opt out in plugins/bStats/config.yml.

Links


Sponsored By

Nexeu Sponsor
Server hosting for this project is sponsored by Nexeu Hosting.

Последние версии

Все версии →
release

OnlySleep 1.4.4

1.4.4
18 окт. 2026 г.204Minecraft: 26.3fabric
Скачать
Что нового
### Security - Fixed ReDoS-prone regular expressions in version and paste response parsing on Paper and Fabric - Replaced deprecated Bukkit APIs flagged by code scanning (`getDescription`, `getDisplayName`, `sendTitle`, `Sound.valueOf`, `TextComponent.fromLegacyText`, `Spigot.sendMessage`, `World.get/setGameRuleValue`) with Adventure and PluginMeta replacements - Removed dead code and made the Fabric `TaskScheduler.Task` holder static - Null-hardened Fabric `/onlysleep world` and `/onlysleep gamemode` command handlers ### Fixed - Fixed an inverted creative-mode check in Fabric `SleepCounts` that miscounted required sleepers - Fixed double percentage symbol appearing in `/onlysleep status` on Paper - Moved diagnostic dump paste uploads off the main server thread to run asynchronously - Replaced deprecated `org.bukkit.ChatColor` across Paper with a dedicated `LegacyText` helper to eliminate deprecation warnings while preserving formatting - Added support for underscores in raw Fabric configuration paths and improved percentage value parsing - Enforced `Locale.ROOT` across commands and configuration keys to prevent locale-specific casing bugs ### Changed - Refactored monolithic sleep managers on Paper and Fabric into dedicated lifecycle controllers (`SkipCoordinator`, `GradualSkipController`, `SleepCounts`, `SleepEffects`, `SleepGamerules`) - Split command handlers into dedicated action, dump, and config editor classes - Unified bed-leave and disconnect handling into a shared departure path on both platforms - Update checks now point at https://demonz.org/projects/onlysleep alongside Modrinth - Halloween countdown display is now colourised for both console and in-game chat
release

OnlySleep 1.4.4

1.4.4
18 окт. 2026 г.544Minecraft: 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2, 26.3bukkit, folia, paper, purpur, spigot
Скачать
Что нового
### Security - Fixed ReDoS-prone regular expressions in version and paste response parsing on Paper and Fabric - Replaced deprecated Bukkit APIs flagged by code scanning (`getDescription`, `getDisplayName`, `sendTitle`, `Sound.valueOf`, `TextComponent.fromLegacyText`, `Spigot.sendMessage`, `World.get/setGameRuleValue`) with Adventure and PluginMeta replacements - Removed dead code and made the Fabric `TaskScheduler.Task` holder static - Null-hardened Fabric `/onlysleep world` and `/onlysleep gamemode` command handlers ### Fixed - Fixed an inverted creative-mode check in Fabric `SleepCounts` that miscounted required sleepers - Fixed double percentage symbol appearing in `/onlysleep status` on Paper - Moved diagnostic dump paste uploads off the main server thread to run asynchronously - Replaced deprecated `org.bukkit.ChatColor` across Paper with a dedicated `LegacyText` helper to eliminate deprecation warnings while preserving formatting - Added support for underscores in raw Fabric configuration paths and improved percentage value parsing - Enforced `Locale.ROOT` across commands and configuration keys to prevent locale-specific casing bugs ### Changed - Refactored monolithic sleep managers on Paper and Fabric into dedicated lifecycle controllers (`SkipCoordinator`, `GradualSkipController`, `SleepCounts`, `SleepEffects`, `SleepGamerules`) - Split command handlers into dedicated action, dump, and config editor classes - Unified bed-leave and disconnect handling into a shared departure path on both platforms - Update checks now point at https://demonz.org/projects/onlysleep alongside Modrinth - Halloween countdown display is now colourised for both console and in-game chat
release

OnlySleep 1.4.3

1.4.3
4 окт. 2026 г.163Minecraft: 26.3fabric
Скачать
Что нового
### Added - Added an Halloween Easter egg
release

OnlySleep 1.4.3

1.4.3
4 окт. 2026 г.647Minecraft: 26.1, 26.1.1, 26.1.2, 26.2, 26.3bukkit, folia, paper, purpur, spigot
Скачать
Что нового
### Added - Added an Halloween Easter egg
release

OnlySleep 1.4.2

1.4.2
20 сент. 2026 г.100Minecraft: 26.3fabric
Скачать
Что нового
--- ## [1.4.2] - 2026-09-20 ### Changed - bumped dependencies for minecraft 26.3 (paper and fabric) - updated fabric clock manager call for 26.3 changes with fallback - updated fabric.mod.json and ci workflows for 26.3 ### Fixed - suppressed removal warning for players_sleeping_percentage on paper 26.3 ---
release

OnlySleep 1.4.2

1.4.2
20 сент. 2026 г.738Minecraft: 26.1, 26.1.1, 26.1.2, 26.2, 26.3bukkit, folia, paper, purpur, spigot
Скачать
Что нового
--- ## [1.4.2] - 2026-09-20 ### Changed - bumped dependencies for minecraft 26.3 (paper and fabric) - updated fabric clock manager call for 26.3 changes with fallback - updated fabric.mod.json and ci workflows for 26.3 ### Fixed - suppressed removal warning for players_sleeping_percentage on paper 26.3 ---
release

OnlySleep 1.4.1

1.4.1
4 сент. 2026 г.216Minecraft: 26.2fabric
Скачать
Что нового
# initial fabric version
release

OnlySleep 1.4.1-Patch update

1.4.1
30 авг. 2026 г.364Minecraft: 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur
Скачать
Что нового
fixes some recent bugs..
release

OnlySleep 1.4.0 -partial fabric support soon

1.4.0
30 авг. 2026 г.26Minecraft: 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
## [1.4.0] - 2026-08-29 Latest-only `1.26.x` - Java 25, Minecraft 26.2 (Paper & Fabric). Full parity + new APIs. ### Added - **In-game config commands**: `/onlysleep set <percentage|skiptype|perworld|skipdelay|morningtime|resettime|gradualspeed|clearweather|clearthunder|bossbar|actionbar|progressbar|title|sounds|managegamerule|afktime> <value>` with persistence, `/onlysleep get <key>`, `/onlysleep toggle <key>`, `/onlysleep world <enable|disable|list> [world]`, `/onlysleep gamemode <enable|disable|list> [type]` - all with tab-complete - **Dump command**: `/onlysleep dump [paste]` - writes `plugins/Onlysleep/dumps/dump-*.txt` with config, worlds, eligible/sleeping/required, gamerules, players (AFK/exempt), messages; `paste` uploads to `paste.mcsrv.top` - **Developer API**: `api/OnlysleepAPI.java` (`setSleepPercentage`, `setSkipType`, `getRequiredSleepingCount`, `forceSkipNight`, `getDiscordMessage`/`stripColor` for ZDiscord), `api/events/NightSkipEvent`/`SleepStartEvent`/`SleepCancelEvent` (cancellable, `fabric/api/*` parity) - **Fabric parity**: `sleep-percentage 0` default, setters, `api/OnlysleepFabricAPI`, same events, full command parity, `FabricConfigManager` persistence, `PermissionHandler` `onlysleep.config/dump/world/gamemode` - **Discord helpers**: `OnlysleepAPI.getSleepStartDiscordMessage` / `getEnoughSleepingDiscordMessage` / `getCancelledDiscordMessage` for ZDiscord bridge ### Changed - **Default to 1.26.x only**: `build.gradle.kts` `paperApi 26.2-R0.1-SNAPSHOT` / `Java 25`, `plugin.yml` `api-version 1.21`, `fabric 26.2` / `java >=25` / `fabric-loader >=0.19.3`, `README` `26.2, Java 25+`, `sleep-percentage 0` (was 50) for true one-player default - **Help** now lists `set/get/toggle/world/gamemode/dump` with `set` options footer ### Fixed - **Gradual mode not cancellable**: leaving bed during `gradual`/`speed` (`activeTransitions`) now cancels if `sleeping < required` - both Paper `manager/SleepManager.java:206,230,469` and Fabric `fabric/SleepManager.java:184,201,419` + timer check each tick
release

OnlySleep 1.3.0

1.3.0
12 июл. 2026 г.577Minecraft: 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2bukkit, folia, paper, purpur, spigot
Скачать
Что нового
> 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. ---