SinglePlayerSleep2

For versions of minecraft older than 1.12 download the appropriate version of SPS for your MC version here... http://dev.bukkit.org/bukkit-plugins/singleplayersleep/
Description:
SinglePlayerSleep2 brings the relaxed single-player sleep experience to multiplayer servers. When a player right-clicks a bed at night, the plugin broadcasts a message like "<player> is sleeping [CANCEL]". If nobody cancels it, the server advances to morning after a short delay — without changing the day count or difficulty.
The plugin also intelligently handles weather: players with the right permissions can clear rain or thunderstorms when they sleep.
Key Features
- One-player sleep – No more waiting for everyone to go to bed.
- Cancel system – Anyone can click to cancel (configurable permissions).
- Storm clearing – Optional permission-based weather reset.
- /sleep command – Alternative to using a bed.
- Lightweight & reliable – Works alongside normal bed behavior when you're the only player online.
DaySkipper (Added in 2.13.31)Players with the sps.dayskipper permission can skip from day to night using any bed.
Optionally require a named item (e.g., "DaySkipper") from config.yml to activate this feature.
Nickname & Advanced Color Support (Updated in 2.13.44)
Fully supports nicknames from VentureChat, Essentials, and HexNicks.
Messages display player nicknames with full **RGB/hex color support**, gradients, and rainbows.
New in 2.13.44: Full color customization inside the sleep messages themselves!
You can now use gradients, solid colors, rainbows, and placeholders in the sleep message, cancel message, DaySkipper messages, and more.
See the updated `messages.yml` (extract from the latest jar if needed) for all the new formatting options.

Sleepmsg examples:
# Color codes are now usable in sleepmsgs, Example: <BLACK>Black<RESET>Reset
# RGB format is §xFF00FF (§xFFFFFF<player> §x000000i§x999999s §x111111s§x888888l§x222222e§x777777e§x333333p§x666666i§x444444n§x555555g)
# THERE MUST BE A COLOR CODE IN FRONT
sleepmsg1: §xFFFFFF<player> §xFF0000is §xFF7F00s§xFFFF00l§x00FF00ee§x0000FFpi§x4b0082n§x9400D3g
sleepmsg2: §xFFFFFF<player> §x00FFFFwent to bed. Sweet Dreams
sleepmsg3: <YELLOW>Shhh! §xFFFFFF<player> §xFF0000is §xFF00FFtrying §x0000FFto §x00FF00sleep!
sleepmsg4: §xFFFFFF<player> §xFF00FFis asleep at the wheel
sleepmsg5: §xFFFFFFNO ONE<colon> ...\n§xFFFFFF<player><colon> §xFFFF00go to bed.
Languages supported:
# Available languages čeština (cs_CZ), Deutsch (de_DE), English (en_US), Español (es_ES), Español (es_MX), Français (fr_FR), Italiano (it_IT), Magyar (hu_HU), 日本語 (ja_JP), 한국어 (ko_KR), Lolcat (lol_US), Melayu (my_MY), Nederlands (nl_NL), Polski (pl_PL), Português (pt_BR), Русский (ru_RU), Svenska (sv_SV), Türkçe (tr_TR), 中文(简体) (zh_CN), 中文(繁體) (zh_TW)
Known conflicts:
I was made aware that Essentials's permission "essentials.sleepingignored" conflicts with SPS.


Messages.yml:
# DO NOT CHANGE VERSION
version: 1.0.4
# Set msgs for random sleep msgs here sleepmsg#: <player> msg here
# Don't forget the space between : and the start of the message.
# Color codes are now usable in sleepmsgs, Example: <BLACK>Black<RESET>Reset
# RGB format is §xFF00FF (§x§F§F§F§F§F§F<player> §x§F§F§A§A§0§0went to bed. Sweet Dreams)
# take Hex code replace hashmark with §x then place § before each character in the Hex code.
# THERE MUST BE A COLOR CODE IN FRONT
messages:
sleep:
count: 5
message_1: <#FFFFFF><player> <rainbow>is sleeping</rainbow>...
message_2: <#FFFFFF><player> <#FFAA00>went to bed. Sweet Dreams!
message_3: <YELLOW>Shhh! <#FFFFFF><player> <#FF0000>is <#FF00FF>trying <#0000FF>to <#00FF00>sleep!
message_4: <#FFFFFF><player> <#FF00FF>is asleep at the wheel
message_5: <#FFFFFF>NO ONE<colon> ...<br><#FFFFFF><player><colon> <#FFFF00>go to bed.
dayskip:
count: 3
message_1: <WHITE><player> <WHITE>wants to <BLUE>sleep <WHITE>the <YELLOW>day <WHITE>away...
message_2: <#FFFFFF><player> <#FF7F00>wants <#FFFF00>to <#00FF00>sleep <#0000FF>the <#4B0082>day <#821073>away<#FFFFFF>...
message_3: <#FFFFFF><player> <gradient:#000000:#FFFF00>wants to sleep the day away</gradient>...
sleep_canceled:
count: 3
message_1: <#FFFFFF><player> <#FF5555>woke up—no dreams for you tonight! <rainbow>Sweet revenge?</rainbow>
message_2: <YELLOW><player> <#FF0000>canceled sleep. <WHITE>The monsters thank you...
message_3: <#FFFFFF><player> <gradient:#FF5555:#00FF00>aborted bedtime</gradient>. Back to the grind!
dayskip_canceled:
count: 3
message_1: <#FFFFFF><player> <#FFAA00>changed their mind—daylight wins! <gradient:#FFFF00:#FF0000>Sun's up!</gradient>
message_2: <YELLOW><player> <#FF0000>bailed on the dayskip. <WHITE>Night owls unite?
message_3: <#FFFFFF><player> <rainbow>woke early</rainbow>—no skipping the sun today!
Permissions:
sps.hermits:
description: Allows one player to change the time to day when using a bed. Without clearing local difficulty.
default: true
sps.unrestricted:
description: Allows the player to sleep uninterrupted. Other players will not be able to cancel it.
default: false
sps.downfall:
description: Clears Downfall upon SPS sleep.
default: false
sps.thunder:
description: Clears Thunderstorm upon SPS sleep
default: false
sps.cancel:
description: Allows canceling Single Player Sleep.
default: true
sps.command:
description: Allows player to use the /sleep command, instead of a bed.
default: op
sps.update:
description: Allows the player to check for updates.
default: op
sps.op:
description: Overrides all permissions.
default: false
sps.showUpdateAvailable:
description: Shows player that there is a version update.
default: op
sps.dayskipper:
description: Allows one player to change the time to night when using a bed. Without clearing local difficulty.
default: false
sps.dayskipcommand:
description: Allows player to use the /dayskip command, instead of a bed.
default: op
sps.showCancelledMsg:
description: Allows player to see the player has cancelled sleeping message.
default: true
If the player is the only one player online, then the bed functions as normal, since the sleep function works before the 10 second delay.
config.yml:
########################################################################################
# IMPORTANT: THIS FILE IS FOR REFERENCE ONLY - DO NOT EDIT OR USE IN-GAME
#
# This config_comments.yml file is ONLY included in the JAR as documentation.
# The plugin NEVER loads or reads this file at runtime.
#
# All actual configuration happens in config.yml.
# Comments and explanations here are just to help you understand the options.
#
# If you edit this file, your changes will be ignored and lost on update/reload.
#
########################################################################################
#
# DO NOT CHANGE VERSION
version: 1.1.0
## Plugin-wide settings (auto-update, debug, language)
plugin:
## Change to false to stop auto-update-check.
auto_update_check: true
## Set to true before sending a log about an issue.
## Logs trace data required to pinpoint where errors are.
debug: false
## Set the language to use. Languages: čeština (cs_CZ), Deutsch (de_DE), English (en_US),
## Español (es_ES), Español (es_MX), Français (fr_FR), Italiano (it_IT), Magyar (hu_HU),
## 日本語 (ja_JP), 한국어 (ko_KR), Lolcat (lol_US), Melayu (my_MY), Nederlands (nl_NL),
## Polski (pl_PL), Português (pt_BR), Русский (ru_RU), Svenska (sv_SV), Türkçe (tr_TR),
## 中文(简体) (zh_CN), 中文(繁體) (zh_TW)
lang: en_US
## Global/shared settings (apply to both sleep and dayskip)
global:
## Enables fancy ANSI colors in console.
colorful_console: true
## Should plugin use short name (SPS) or long name (SinglePlayerSleep)?
long_plugin_name: true
## Default world name to use for console commands (/sleep or /dayskip) when no world is specified.
## Use the exact world name (case-sensitive). If invalid or missing, falls back to the first loaded world.
console_default_world: "world"
## Set to true to use random messages for sleep/dayskip broadcasts.
random_messages: true
## Should broadcasts be per world, or server wide? (Should be true for multiverse/multi-world servers)
broadcast_per_world: true
## Set to true to ignore vanished players when handling sleep events and canceling.
ignore_vanished: true
## Color for the main message text (was sleepmsgcolor / skip_color).
## Colors: AQUA, BLACK, GOLD, GRAY, BLUE, GREEN, RED, YELLOW, WHITE,
## DARK_AQUA, DARK_BLUE, DARK_GRAY, DARK_GREEN, DARK_RED, DARK_PURPLE, LIGHT_PURPLE,
## MAGIC, BOLD, STRIKETHROUGH, UNDERLINE, ITALIC, RESET
message_color: WHITE
## Color for player names in messages.
player_name_color: WHITE
## Color for the [CANCEL] link text in broadcast messages.
cancel_color: RED
## Color for the brackets around the [CANCEL] link.
cancel_bracket_color: YELLOW
## Cooldown limits (in seconds) to prevent spam
limits:
## Time a player must wait before using sleep or dayskip again.
## Set to 0 to disable.
use_cooldown: 30
## Time a player must wait before using cancel again.
## Set to 0 to disable.
cancel_cooldown: 30
## Should player nicknames use their display name (true) or username (false)?
nickname_use_displayname: true
## Sleep settings
sleep:
## Set to true to auto-fix playersSleepingPercentage to 100 if invalid or <= 0.
auto_fix_sleeping_percentage: true
## Worlds where sleep is disabled (case-sensitive, comma-separated)
blacklist: world_nether, world_the_end
## Delay between sleep start and day change (seconds). Minimum 1, recommend 10.
delay: 10
## If true, disables all broadcast messages and allows anyone to sleep.
unrestricted: false
## Set wake time: Early (23000) or Normal (24000)
waketime: NORMAL
## Should SPS reset the time_since_rest stat for all players in the world?
reset_insomnia: false
## Set whether to allow player to stop rain when it is not night.
clear_rain: false
## Set whether the player should be told it must be night/storm to use.
notify_must_be_night: false
messages:
## Set if the [CANCEL] link is shown in broadcast messages.
display_cancel: true
## Set to true to broadcast "<player> canceled sleep."
broadcast_cancel: true
## Set to true to cancel sleep if the player exits their bed.
exit_bed_cancels: false
## DaySkip settings
dayskip:
## Enable(true) or Disable(false) the dayskipper feature.
enabled: false
## Worlds where dayskip is disabled (case-sensitive, comma-separated)
blacklist: world_nether, world_the_end
## Delay between dayskip request and night change (seconds). Minimum 1, recommend 10.
delay: 10
## If true this will disable ability of players to cancel DaySkip.
unrestricted: false
## Require DaySkipper item to use DaySkip.
item_required: true
messages:
## Set if the [CANCEL] link is shown in broadcast messages.
display_cancel: true
## Set to true to broadcast "<player> canceled dayskip."
broadcast_cancel: true
Commands:
/sps - shows help /sps reload - reloads configs. /sps update - checks for updates. /sleep - command to sleep instead of using bed, requires permission. /spscancel - cancels sleep, or dayskip, if either is scheduled. /dayskip - command to dayskip instead of using bed, requires permission.
For help you can post issues and suggest ideas on my discord server.
License:
MIT License
This plugin utilizes bStats to collect anonymous statistics
Contributing:
This plugin is open source; you can view the source code on github. Feel free to open issues there or submit pull requests.
If you like this, check out my other plugin,
SinglePlayerSleep,
NoEndermanGrief,
DragonDropElytra,
ShulkerRespawner,


-
View User Profile
-
Send Message
Posted Jun 28, 2020In reply to nagi0e:
I'd need a copy of your latest.log file, with someone trying to sleep with debug set to true in the config.yml. Without that there is no way for me to know what is causing the issue.
Feel free to join my discord server for faster responses. https://discord.gg/Bh5YDRC
-
View User Profile
-
Send Message
Posted Jun 24, 2020SPS does work in 1.16.1, it however causes an exception error in the console, and does not broadcast the sleep message. I am working on a fix, this is due to a change in the way 1.16 sends chat messages.
-
View User Profile
-
Send Message
Posted Jun 23, 2020For 1.16??
-
View User Profile
-
Send Message
Posted Jun 23, 2020In reply to Forge_User_65070351:
As soon as the bukkit/spigot peeps release bukkit/spigot for 1.16 I'll update, if any is needed.
-
View User Profile
-
Send Message
Posted May 1, 2020hi, is there any way to disable the sleep option so that it never gets through the night?-
View User Profile
-
Send Message
Posted May 1, 2020In reply to snowssb:
So you want the DaySkip option only? You could disable the permission sps.hermits, and then people would only be able to sleep if alone on the server.
-
View User Profile
-
Send Message
Posted Apr 15, 2020como instalo esto? en mi base de datos no me aparecen los archivos :(
-
View User Profile
-
Send Message
Posted Apr 15, 2020In reply to angelvega33:
-
View User Profile
-
Send Message
Posted Apr 2, 2020config above is messed up; has html tags and all single line?
-
View User Profile
-
Send Message
Posted Apr 3, 2020In reply to JennerPalacios:
Thank you for pointing that out, not sure what bukkit did, but it has been fixed.
-
View User Profile
-
Send Message
Posted Apr 2, 2020please plugin version 1.15.2-
View User Profile
-
Send Message
Posted Apr 2, 2020In reply to Forge_User_67264269:
The plugin works on 1.15.2 Are you having an issue?
-
View User Profile
-
Send Message
Posted Mar 26, 2020Hello,
Love the plugin.. it works well for my server.
I have one question is there away for it to kick the player once it turns to day?
-
View User Profile
-
Send Message
Posted Mar 26, 2020In reply to Forge_User_78404653:
also your discord link has expired :(
-
View User Profile
-
Send Message
Posted Mar 26, 2020In reply to Forge_User_78404653:
Discord link fixed. It wasn't supposed to expire, hopefully this one doesn't.
-
View User Profile
-
Send Message
Posted Mar 26, 2020In reply to Forge_User_78404653:
Kick them from the server? If player's are in survival it kicks them out of bed.
-
View User Profile
-
Send Message
Posted Mar 27, 2020In reply to joelhstoner:
Hello, i didnt mean server. when i sleep it doesnt kick me from the bed after, ive tried this as a op and non op on the server.
any ideas?
-
View User Profile
-
Send Message
Posted Mar 27, 2020In reply to Forge_User_78404653:
Are you in creative?
-
View User Profile
-
Send Message
Posted Mar 27, 2020In reply to joelhstoner:
No, i was oped on the server and it wouldnt work, i then deoped myself, still didnt work.
my game mode is survival and its the same with the other players on the server.
-
View User Profile
-
Send Message
Posted Mar 28, 2020In reply to Forge_User_78404653:
Please have the admin turn on debug in the singleplayersleep config.yml file, and then try to sleep, and cancel and send me the log.
Also check if Essentials or EssentialsX is on the server, if so, the permission essentials.sleepingignored must be turned off for SPS to work.