OnlySleep

One player sleeps, everyone wakes up — configurable night-skipping engine with boss bar countdowns, Folia support, and custom buffs.

Category: games Version: 1.4.4 Downloads: 1,010
Download OnlySleep Download for PAPER Download for FABRIC Github Modrinth GitHub Source

Onlysleep

One player sleeps. Everyone wakes up.

Modrinth
Hangar
bStats
Build
License

Supports: Bukkit, Spigot, Paper, Purpur, Folia, and compatible forks (Minecraft 26.3, Java 25+)


What is Onlysleep?

A clean, lightweight sleep plugin that does one thing well: skip the night when a player goes to bed. No bloat, no wall of config you'll never touch. Just drop it in, and it works.

One player sleeping is the default. If you want a different threshold, say half the server or everyone, you can set that too. Weather clears alongside the night. The whole thing is per-world, so a player sleeping in world_nether won't skip the overworld.

Features

  • One-player sleep by default, or any percentage (0-100%)
  • Per-world sleep counting (each world tracks separately)
  • Weather skip: clear rain and thunder independently
  • Boss bar, action bar, progress bar, and title support
  • Configurable sounds when a player starts sleeping and when night is skipped
  • AFK detection (built-in tracker, plus EssentialsX and CMI)
  • Smart filtering: spectators, creative, flying, exempt permissions, disabled gamemodes
  • Automatic gamerule management for playersSleepingPercentage
  • PlaceholderAPI integration (12+ placeholders)
  • Update checker and bStats (anonymous, opt-out available)

Installation

  1. Download the latest Onlysleep-*.jar from Modrinth, Hangar, or GitHub Releases.
  2. Drop it into your server's plugins/ folder.
  3. Restart your server.
  4. Edit plugins/Onlysleep/config.yml to your liking.
  5. Apply changes with /onlysleep reload.

Requirements: Minecraft 26.3 and Java 25+. No other plugins needed. PlaceholderAPI is optional.

Configuration

The defaults work out of the box. Here are the main settings:

SettingDefaultDescription
sleep-percentage0% of eligible players needed (0 = one player)
skip-delay-ticks60Delay before night skip (20 ticks = 1 second)
skip-typeinstantinstant, speed, or gradual
per-world-sleeptrueOnly count players in the same world
clear-weathertrueClear rain when sleeping; thunder is configured separately
clear-thundertrueClear thunder independently of clear-weather
manage-gameruletrueTemporarily override vanilla sleep math in enabled worlds

See the full config.yml for all options and messages.yml for message customization.

Commands

CommandDescriptionPermission
/onlysleepShow helponlysleep.command
/onlysleep helpShow help pageonlysleep.command
/onlysleep infoPlugin informationonlysleep.info
/onlysleep statusDetailed statusonlysleep.status
/onlysleep reloadReload configurationonlysleep.reload
/onlysleep updateCheck for a newer releaseonlysleep.update
/onlysleep set <option> <value>Change and persist a config valueonlysleep.config
/onlysleep get <option>Read a config valueonlysleep.status
/onlysleep toggle <option>Toggle a boolean config valueonlysleep.config
/onlysleep world <enable\|disable\|list> [world]Manage disabled worldsonlysleep.world
/onlysleep gamemode <enable\|disable\|list> [type]Manage disabled game modesonlysleep.gamemode
/onlysleep dump [paste]Create a diagnostic dumponlysleep.dump

Aliases: /os, /sleep

Permissions

PermissionDefaultDescription
onlysleep.*OPAll administrative permissions (does not grant sleep exemption)
onlysleep.commandEveryoneOpen /onlysleep and its help; protected subcommands keep their own permissions
onlysleep.infoOPView plugin info
onlysleep.reloadOPReload config
onlysleep.statusOPView status
onlysleep.exemptNoneExcluded from sleep calculations (operators sleep by default)
onlysleep.updateOPReceives update notifications
onlysleep.configOPRead and change configuration in game
onlysleep.worldOPManage disabled worlds
onlysleep.gamemodeOPManage disabled game modes
onlysleep.dumpOPCreate diagnostic dumps
onlysleep.adminOPAlias for every admin permission

PlaceholderAPI

When PlaceholderAPI is installed, you get these placeholders:

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%Comma-separated 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 lands in build/libs/.

API

Onlysleep plugin = Onlysleep.getInstance();
SleepManager sleepManager = plugin.getSleepManager();

boolean sleeping = sleepManager.isPlayerSleeping(player);
int required = sleepManager.getRequiredSleepingCount(world);
int current = sleepManager.getSleepingCount(world);
boolean skipping = sleepManager.isSkipScheduled(world);

bStats

This plugin uses bStats to collect anonymous usage statistics. No personal data is collected. You can opt out in plugins/bStats/config.yml.

bStats

Links


Sponsored By

Nexeu Sponsor
Looking for high-performance, budget-friendly game server hosting? Check out Nexeu Hosting!

License

MIT - see LICENSE.