Skip the night with just one player sleeping โ or configure it your way.
Supports: Bukkit ยท Spigot ยท Paper ยท Purpur ยท Folia ยท Any Paper fork
- One-Player Sleep โ Default mode lets a single player skip the night
- Configurable Percentage โ Require any % of players to sleep (50%, 75%, 100%, etc.)
- Per-World Sleep โ Configure per-world or global sleep counting
- Multi-Platform โ Works on Bukkit, Spigot, Paper, Folia, and all derivatives
- Weather Skip โ Automatically clear storms and thunderstorms
- Visual Feedback โ Boss bar, action bar, progress bar, and title support
- Sound Effects โ Configurable sounds when night is skipped
- Smart Player Filtering โ Ignores AFK, spectators, exempt players, and more
- AFK Detection โ Supports EssentialsX and CMI AFK status
- PlaceholderAPI Support โ Over 10 placeholders for integrations
- Update Checker โ Automatically checks for new versions
- bStats Metrics โ Anonymous usage statistics
- Disable Per World โ Disable sleep skipping in specific worlds
- Download the latest
Onlysleep-*.jarfrom Modrinth, Hangar, or Spigot - Place it in your server's
plugins/folder - Restart your server (or reload with
/reloadโ though restart is recommended) - Configure
plugins/Onlysleep/config.ymlto your liking - Reload with
/onlysleep reload
- Java 21+ (The plugin requires Java 21+ to run)
- Minecraft 1.16.5+ (Bukkit, Spigot, Paper, Folia, or any compatible server)
- No other plugins required! (Works standalone)
- [Optional] PlaceholderAPI for placeholder expansion support
The plugin works out-of-the-box with sensible defaults. Just drop it in and go!
| Setting | Default | Description |
|---|---|---|
sleep-percentage |
50 |
% of players needed to sleep (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 storms when sleeping |
manage-gamerule |
true |
Auto-manage playersSleepingPercentage gamerule |
See the full config.yml for all options.
All messages are fully customizable with color codes (&0-&f) and placeholders.
| 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 command |
onlysleep.info |
OP | View plugin information |
onlysleep.reload |
OP | Reload configuration |
onlysleep.status |
OP | View plugin status |
onlysleep.exempt |
None | Excluded from sleep calculations (operators sleep by default) |
onlysleep.update |
OP | Receives update notifications |
Onlysleep provides 12+ placeholders when PlaceholderAPI is installed.
| Placeholder | Description |
|---|---|
%onlysleep_sleeping% |
Number of sleeping players in player's world |
%onlysleep_required% |
Number of players needed to skip night |
%onlysleep_percentage% |
Configured sleep percentage |
%onlysleep_total% |
Total eligible player count in the world |
%onlysleep_progress% |
Percentage of required sleepers achieved (0-100) |
%onlysleep_progress_bar% |
Visual progress bar of sleep progress |
%onlysleep_sleeping_names% |
Comma-separated names of sleeping players |
%onlysleep_status% |
"Sleeping" or "Awake" for the player |
%onlysleep_is_sleeping% |
true/false if player is sleeping |
%onlysleep_is_night% |
true/false if it's night |
%onlysleep_is_sleepable% |
true/false if it's night/storm in the world |
%onlysleep_skipping% |
true/false if night is being skipped |
%onlysleep_enabled% |
true/false if sleeping is enabled in player's 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 specific world |
%onlysleep_world_required_<world>% |
Required count in specific world |
%onlysleep_world_total_<world>% |
Total eligible in specific world |
git clone https://github.com/DemonZ-Development/Onlysleep.git
cd Onlysleep
./gradlew clean buildThe compiled JAR will be in build/libs/.
git clone https://github.com/DemonZ-Development/Onlysleep.git
cd Onlysleep
mvn clean packageThe compiled JAR will be in target/.
Onlysleep provides a simple API for other plugins:
// Get the plugin instance
Onlysleep plugin = Onlysleep.getInstance();
// Get sleep manager
SleepManager sleepManager = plugin.getSleepManager();
// Check if a player is currently counted as sleeping
boolean sleeping = sleepManager.isPlayerSleeping(player);
// Get how many players are needed in a world
int required = sleepManager.getRequiredSleepingCount(world);
// Get how many are currently sleeping in a world
int sleeping = sleepManager.getSleepingCount(world);
// Check if a night skip is scheduled
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.
- ๐ Website
- ๐ป GitHub
- ๐ฎ Modrinth
- ๐ฆ Twitter / X
- ๐ฅ YouTube
- ๐ธ Instagram
- ๐ Discord
- ๐ Reddit
- ๐ง demonzdevelopment@gmail.com
Developed by Demonz Development with love for the Minecraft community.
This project is licensed under the MIT License - see the LICENSE file for details.
