One player sleeps. Everyone wakes up.
Supports: Bukkit, Spigot, Paper, Purpur, Folia, and compatible forks (Minecraft 1.20.4β26.2, Java 21+; Paper 26.1+ requires Java 25)
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.
- 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)
- Download the latest
Onlysleep-*.jarfrom Modrinth, Hangar, or GitHub Releases. - Drop it into your server's
plugins/folder. - Restart your server.
- Edit
plugins/Onlysleep/config.ymlto your liking. - Apply changes with
/onlysleep reload.
Requirements: Minecraft 1.20.4β26.2 and Java 21+. Paper 26.1+ requires Java 25. No other plugins needed. PlaceholderAPI is optional.
The defaults work out of the box. Here are the main settings:
| Setting | Default | Description |
|---|---|---|
sleep-percentage |
50 |
% of eligible players needed (0 = one player) |
skip-delay-ticks |
60 |
Delay before night skip (20 ticks = 1 second) |
skip-type |
instant |
instant, speed, or gradual |
per-world-sleep |
true |
Only count players in the same world |
clear-weather |
true |
Clear rain when sleeping; thunder is configured separately |
clear-thunder |
true |
Clear thunder independently of clear-weather |
manage-gamerule |
true |
Temporarily override vanilla sleep math in enabled worlds |
See the full config.yml for all options and messages.yml for message customization.
| Command | Description | Permission |
|---|---|---|
/onlysleep |
Show help | onlysleep.command |
/onlysleep help |
Show help page | onlysleep.command |
/onlysleep info |
Plugin information | onlysleep.info |
/onlysleep status |
Detailed status | onlysleep.status |
/onlysleep reload |
Reload configuration | onlysleep.reload |
Aliases: /os, /sleep
| Permission | Default | Description |
|---|---|---|
onlysleep.* |
OP | All permissions |
onlysleep.command |
Everyone | Use /onlysleep |
onlysleep.info |
OP | View plugin info |
onlysleep.reload |
OP | Reload config |
onlysleep.status |
OP | View status |
onlysleep.exempt |
None | Excluded from sleep calculations (operators sleep by default) |
onlysleep.update |
OP | Receives update notifications |
When PlaceholderAPI is installed, you get these placeholders:
| Placeholder | Description |
|---|---|
%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 |
git clone https://github.com/DemonZ-Development/Onlysleep.git
cd Onlysleep
./gradlew clean buildThe compiled JAR lands in build/libs/.
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);This plugin uses bStats to collect anonymous usage statistics. No personal data is collected. You can opt out in plugins/bStats/config.yml.
MIT - see LICENSE.
