-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
The plugin calculates the number of players needed to skip based on the sleep-percentage setting and the total eligible players in the world.
Formula: required = max(1, ceil(total ร percentage / 100))
Example with 10 eligible players:
| Percentage | Required |
|---|---|
| 0% (one-player sleep) | 1 |
| 50% (default) | 5 |
| 75% | 8 |
| 100% | 10 |
Players with onlysleep.exempt permission are excluded from the total. See Player Filtering for who counts.
Set sleep-percentage: 0 in config.yml. Any single eligible player can skip the night.
Set sleep-percentage: 100 in config.yml โ all eligible players in the world must sleep.
Note: If
per-world-sleep: true, only players in the same world count. Exempted players don't count either.
By default, players can only sleep during the night (Minecraft time 12542-23458) or during a storm. The message "You can only sleep during the night or a thunderstorm." will appear. This is vanilla Minecraft behavior.
This is intentional. If a player gets out of bed while the night skip is still pending (during the skip-delay-ticks delay), the skip is cancelled. This prevents griefing where one player sleeps and another immediately gets up.
Tip: Set
skip-delay-ticks: 0for an instant skip that can't be interrupted.
Yes. Onlysleep has full Folia support. It uses the Folia region scheduler for world-specific tasks and the global region scheduler for broadcast tasks. On non-Folia servers, it falls back to the standard Bukkit scheduler.
Yes. Onlysleep works on any server software derived from Bukkit/Spigot/Paper. It automatically detects the platform and adjusts its behavior accordingly.
Edit config.yml and add worlds to the disabled-worlds list:
disabled-worlds:
- "world_nether"
- "world_the_end"-
count-afk-as-sleeping: trueโ AFK players are counted as if they're sleeping (helps reach the threshold) -
exclude-afk-from-total: trueโ AFK players are removed from the total count (lowers the threshold)
The most common configuration is count-afk-as-sleeping: false + exclude-afk-from-total: true, which means AFK players are completely ignored โ they don't count toward the total required and they don't count as sleeping. This prevents AFK players from blocking night skip.
Enable require-all-players-online: true in config.yml. When enabled, if any eligible player is offline, the required count is set to a very high number (effectively preventing skip).
Note: Onlysleep uses an intelligent offline player tracker that caches the offline player count asynchronously to avoid lag on bed enter.
Onlysleep doesn't have a built-in cooldown, but you can achieve a similar effect by:
- Setting
skip-delay-ticksto a higher value (e.g.,100for 5 seconds) - The skip prevents re-skipping while pending (players see "No one needs to sleep right now")
It's not recommended to use Onlysleep alongside other sleep plugins. They will conflict over who controls the night skip mechanic. Onlysleep is a complete sleep management solution and doesn't need other sleep plugins.
Symptoms: Plugin jar loads but fails with a red error in console.
Causes & Solutions:
- Outdated Minecraft version โ Onlysleep requires Minecraft 1.16.5+
- Incompatible Java version โ Onlysleep requires Java 8+ (Java 16+ recommended)
- Corrupted jar file โ Re-download the jar file
- Missing dependencies โ Onlysleep has no hard dependencies, but ensure you're running a supported server software
Check the full error in console for specific details.
Symptoms: /onlysleep returns "Unknown command" or no response.
Causes & Solutions:
- Plugin didn't load โ Check console for errors
-
Permission denied โ Ensure you have
onlysleep.commandpermission (default: everyone) -
Command conflict โ Another plugin might be registering the same
/sleepalias -
Server didn't restart โ Try a full restart instead of
/reload
Symptoms: %onlysleep_sleeping% shows as plain text instead of a number.
Causes & Solutions:
- PlaceholderAPI not installed โ Onlysleep's placeholders require PlaceholderAPI
- PlaceholderAPI loaded after Onlysleep โ Try restarting the server
-
Expansion not registered โ Check console for
"PlaceholderAPI expansion registered!" -
Wrong placeholder syntax โ Ensure you're using
%onlysleep_sleeping%(not{onlysleep_sleeping}โ though some plugins support both formats)
Symptoms: Players sleep but nothing happens.
Causes & Solutions:
-
Not enough players sleeping โ Check the required count with
/onlysleep info -
World is disabled โ Check
disabled-worldsin config.yml -
All players need to sleep โ Set
sleep-percentage: 0for one-player sleep - Require all players online โ If enabled, offline players block the skip
-
Boss bar isn't showing but skip works โ Check
ui.boss-bar.enabled: true -
Permission issue โ Players might have
onlysleep.exemptset
Run /onlysleep status to see current settings.
Symptoms: You edited config.yml but nothing changed.
-
You need to reload โ Run
/onlysleep reload - YAML syntax error โ Check for missing spaces or tabs. YAML is strict about indentation
-
Wrong file location โ Ensure you're editing
plugins/Onlysleep/config.yml, not the one in the jar - Plugin didn't load โ Check console for errors on startup
Symptoms: Lag spike when someone enters a bed.
Causes & Solutions:
-
Large server with many offline players โ If
require-all-players-online: trueis enabled, the offline player tracker loads the player count asynchronously. This should not cause lag - Other plugins interfering โ Try disabling other plugins to identify conflicts
- Outdated server software โ Update to the latest version of your server software
If you encounter a bug:
- Check that you're running the latest version of Onlysleep
- Check the console for any error messages
-
Create an issue on GitHub Issues with:
- Plugin version and server software version
- Steps to reproduce the bug
- Any relevant console errors
- Your
config.yml(if relevant)
- Join the Discord for faster support
- Check the Configuration Reference for all available settings
- Review the Commands & Permissions to ensure proper setup
- Join the Discord for community support
- Open a GitHub Issue
Onlysleep โ Developed by Demonz Development with โค๏ธ for the Minecraft community.
Licensed under the MIT License.
Links:
๐ Website ยท ๐ป GitHub ยท ๐ฎ Modrinth
๐ฆ Twitter/X ยท ๐ฅ YouTube ยท ๐ธ Instagram
๐ Discord ยท ๐ Reddit ยท ๐ demonzdevelopment@gmail.com