-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Onlysleep's configuration is located at plugins/Onlysleep/config.yml. The plugin works out-of-the-box with sensible defaults, so you only need to change what you want.
Tip: After editing config.yml, run
/onlysleep reloadto apply changes without restarting the server.
sleep-percentage: 50The percentage of eligible players that need to sleep to skip the night.
| Value | Behavior |
|---|---|
0 |
One-player sleep (any single player can skip) |
50 |
Half of eligible players (default) |
100 |
All eligible players must sleep |
| Any % | Calculates required count: ceil(total ร percentage / 100)
|
Note: The actual player count is calculated per-world (if
per-world-sleep: true). Players withonlysleep.exemptpermission are excluded from the count. See Player Filtering below.
skip-delay-ticks: 60Delay in ticks before the night is skipped after enough players sleep.
- 20 ticks = 1 second
- Default:
60(3 seconds) - Set to
0for instant skip - Note: If any sleeping player gets out of bed during this delay, the night skip is cancelled
skip-type: instantThe type of night skip animation.
| Value | Description |
|---|---|
instant |
Time changes immediately to morning |
speed |
Time fast-forwards (adds 24000 ticks to set to next day) |
gradual |
Time smoothly transitions (uses gradual-skip-speed-ticks) |
gradual-skip-speed-ticks: 30How fast time passes during a gradual skip (higher = faster). Only used when skip-type: gradual.
morning-time: 1000Time of day to set after skipping (in Minecraft ticks).
| Value | Time of Day |
|---|---|
0 |
Dawn (sunrise) |
1000 |
Morning (default) |
6000 |
Noon |
12000 |
Dusk |
18000 |
Night |
reset-time: trueIf true, sets time to 0 (dawn) after skipping, ignoring morning-time.
If false, uses the morning-time value above.
per-world-sleep: trueIf true, only counts players in the same world as the sleeping player(s).
If false, counts players across all worlds.
Example: With
per-world-sleep: trueand a 50% requirement in a world with 10 eligible players, 5 players from that world need to sleep. Players in other worlds don't count.
require-all-players-online: falseIf true, all eligible players must be online before sleep counting can begin.
If any eligible player is offline, the required count is set to Integer.MAX_VALUE (effectively preventing skip until all eligible players are online).
Performance note: When enabled, Onlysleep uses an
OfflinePlayerTrackerthat caches the offline player count asynchronously to avoid expensive disk I/O on every bed enter.
clear-weather: true
reset-weather: true
clear-thunder: true
reset-thunder: true
reset-weather-cycle: trueControls whether storms and thunderstorms are cleared when a player sleeps.
| Setting | Description |
|---|---|
clear-weather |
Clear rain/thunder when a player sleeps during a storm |
reset-weather |
Actually set rain to clear after skipping |
clear-thunder |
Clear thunder specifically |
reset-thunder |
Actually set thunder to clear after skipping |
reset-weather-cycle |
Reset the weather cycle duration (prevents immediate rain after clearing) |
count-afk-as-sleeping: falseIf true, AFK players are counted as sleeping for the percentage calculation, even if they aren't in bed. This helps progress the night skip when AFK players aren't contributing.
exclude-afk-from-total: trueIf true, AFK players are excluded from the total player count. This prevents AFK players from making it harder to skip the night (since they won't sleep).
Common combination:
count-afk-as-sleeping: false+exclude-afk-from-total: true= AFK players are ignored entirely (don't count toward required, don't count as sleeping).
count-spectators: falseIf true, spectator mode players are included in the total eligible count.
count-flying: trueIf true, flying players are included in the total eligible count.
ignore-creative-mode: falseIf true, creative mode players are completely ignored (not counted toward required, not allowed to sleep-skip).
afk-detection:
use-essentials: true
use-cmi: true
time-seconds: 300| Setting | Description |
|---|---|
use-essentials |
Check EssentialsX AFK metadata |
use-cmi |
Check CMI AFK status |
time-seconds |
Time in seconds before a player is considered AFK by the built-in AFK tracker. Set to 0 to disable built-in AFK detection (EssentialsX/CMI AFK still works) |
The AFK check order is:
- Built-in AFK tracker (movement + interaction based)
- EssentialsX metadata (
afkmetadata value) - CMI API (
getCMIPlayer().getAfkData().isAfk())
ui:
action-bar:
enabled: trueShows a message in the action bar (above the hotbar) to sleeping players while the night skip is pending.
ui:
boss-bar:
enabled: true
color: BLUE
style: SOLIDShows a boss bar to all players in the world when night is being skipped.
| Setting | Options |
|---|---|
color |
BLUE, GREEN, PINK, PURPLE, RED, WHITE, YELLOW
|
style |
SOLID, SEGMENTED_6, SEGMENTED_10, SEGMENTED_12, SEGMENTED_20
|
ui:
progress-bar:
enabled: true
symbol: "โ "
length: 20A visual progress bar in the action bar showing sleep progress. Example output when half complete:
Sleeping... โ โ โ โ โ โ โ โ โ โ โโโโโโโโโโ (5/10)
| Setting | Description |
|---|---|
symbol |
Character used for progress bar segments |
length |
Total length of the progress bar in segments |
ui:
title:
enabled: false
title: "&bGood Morning!"
subtitle: "&fNight skipped by &b%player%"
fade-in: 10
stay: 70
fade-out: 20Shows a title/subtitle to all players when night is skipped.
| Setting | Description |
|---|---|
title |
Main title text (supports %player% placeholder) |
subtitle |
Subtitle text (supports %player% placeholder) |
fade-in |
Fade-in duration in ticks |
stay |
Stay duration in ticks |
fade-out |
Fade-out duration in ticks |
Color codes (&0-&f) and formatting (&l, &o, etc.) are supported.
sounds:
enabled: true
skip-sound: ENTITY_PLAYER_LEVELUP
skip-sound-volume: 1.0
skip-sound-pitch: 1.0
night-sound: ENTITY_PLAYER_LEVELUP
night-sound-volume: 0.5
night-sound-pitch: 1.0
storm-sound: ENTITY_LIGHTNING_BOLT_THUNDER
storm-sound-volume: 1.0
storm-sound-pitch: 1.0| Setting | Description |
|---|---|
enabled |
Master toggle for all sounds |
skip-sound |
Sound played when the night skip completes |
night-sound |
Alternative night skip sound |
storm-sound |
Sound played during storm skip |
Any valid Bukkit Sound enum value can be used.
manage-gamerule: trueIf true, Onlysleep will automatically manage the playersSleepingPercentage gamerule. This is useful for servers where Onlysleep's custom logic should override Minecraft's default sleep behavior.
check-for-updates: trueIf true, Onlysleep checks for newer versions on startup via the Modrinth API. Updates are logged to console and notified to players with the onlysleep.update permission.
disabled-worlds: []A list of world names where sleep skipping is disabled entirely.
disabled-worlds:
- "world_nether"
- "world_the_end"Players in disabled worlds will see the message: "Sleep skipping is disabled in this world."
disabled-gamemodes: []A list of game modes where sleep skipping is disabled for players.
disabled-gamemodes:
- "SPECTATOR"| Option | Description |
|---|---|
SURVIVAL |
Disable for survival mode players |
CREATIVE |
Disable for creative mode players |
ADVENTURE |
Disable for adventure mode players |
SPECTATOR |
Disable for spectator mode players |
Click to expand the full default config.yml
# --- Sleep Settings ---
sleep-percentage: 50
skip-delay-ticks: 60
skip-type: instant
gradual-skip-speed-ticks: 30
morning-time: 1000
reset-time: true
per-world-sleep: true
require-all-players-online: false
# --- Weather Settings ---
clear-weather: true
reset-weather: true
clear-thunder: true
reset-thunder: true
reset-weather-cycle: true
# --- Player Filtering ---
count-afk-as-sleeping: false
exclude-afk-from-total: true
count-spectators: false
count-flying: true
ignore-creative-mode: false
# --- AFK Detection ---
afk-detection:
use-essentials: true
use-cmi: true
time-seconds: 300
# --- UI Settings ---
ui:
action-bar:
enabled: true
boss-bar:
enabled: true
color: BLUE
style: SOLID
progress-bar:
enabled: true
symbol: "โ "
length: 20
title:
enabled: false
title: "&bGood Morning!"
subtitle: "&fNight skipped by &b%player%"
fade-in: 10
stay: 70
fade-out: 20
# --- Sound Settings ---
sounds:
enabled: true
skip-sound: ENTITY_PLAYER_LEVELUP
skip-sound-volume: 1.0
skip-sound-pitch: 1.0
night-sound: ENTITY_PLAYER_LEVELUP
night-sound-volume: 0.5
night-sound-pitch: 1.0
storm-sound: ENTITY_LIGHTNING_BOLT_THUNDER
storm-sound-volume: 1.0
storm-sound-pitch: 1.0
# --- Gamerule Management ---
manage-gamerule: true
# --- Update Checker ---
check-for-updates: true
# --- Disabled Worlds ---
disabled-worlds: []
# --- Disabled Game Modes ---
disabled-gamemodes: []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