Sleep
[ONELINER:Complete customization for sleep related features (messages, idle players, rewards, force, etc.)]
[ > Features | Commands | Configuration | Permissions ]
- Customizable broadcast messages for all sleep related events
- Ignore idle players from preventing sleep
- Force sleep when minimum percent and/or count of players are in bed
- Customizable reward system for using a bed to pass the night (health, experience, effects, etc.)
- Allow sleeping with a temporary bed that does not affect respawn location
- Ignore underground players below a configurable depth from preventing sleep
- Fast forward night time relative to how many players are in bed
- Disable sleep but still allow a bed to set respawn location
- Always ignore specific players for sleep (bots/admins, uses permissions)
- Force sleep when specific players enter a bed (uses permissions)
- On-demand sleep status with the /sleep command (who is not in bed)
- Force sleep manually with the /sleep.force command (requires permission)
- Full multi-world support
Troubleshooting
If you are having trouble determining why something isn't working, set log-level: ALL
in the /plugins/Sleep/config.yml file and restart your server. Wait for the problem to reoccur then paste the server.log file to somewhere like http://gist.github.com and post a comment here with a link to the paste.
A few questions.
Could you add documentation explaining what daybed does? (daybed:revert and daybed:duration to be more precise) as well as how min max scale and speed interact with how time is fast-forwarded and how it interacts with how many people need to be asleep to engage fast forward.
Additionally the only things this is missing from what I had designed in my head are a delay before any fastforward or night skipping happens, during which people who DON'T want the night to end could veto the night skipping somehow.
The other thing I was hoping for, and this isn't as critical, is that people leaving a bed don't stop the fast forward or night skip, and instead enter a slept state that resets once the sun comes up.
Holy crap. I had *just* fired up eclipse to write this exact plugin, and figured I would do a little more searching and found it, thank-you so much, I may add a few improvements however.
@nikrivers
I just uploaded an update: http://dev.bukkit.org/bukkit-plugins/sleep/files/15-sleep-7-3-0/
Any plans to update to 1.6.4?
It wouldn't surprise me at all if events are not firing properly, MCPC+ seems to be notorious for missing bukkit events, that being said, they are more focused on 1.6 at the moment rather than FTB's 1.5.2 modpacks. I'll wait until were on 1.6 before looking into it further.
Thanks for the reply tho.
Edit: Just to update It seems when a player goes 'idle' thats when the upcount takes place. We noticed it tonight, bed required +1 to sleep, player came out of 'idle' and suddenly it said it required +3 to sleep.
@Yorkforce
I have not seen such a problem to date. However, I don't directly support FTB or MCPC+ environments either.
No, it shouldn't matter if you have PlayerActivity installed as a plugin or not. A proper version of the code used in PlayerActivity is supplied alongside Sleep if you don't have PlayerActivity installed as an independent plugin. This all happens automatically without you having to do anything.
My guess is something with your server is not firing PlayerChangedWorldEvent or PlayerQuitEvent for certain Players. These may be "fake" players most likely and I have seen other problems related to such in the past. I'm not sure I have any easy answer for you. You might try turning on the debug logging as indicating in the Troubleshooting section above. Then if you can get me a copy of your server.log file, I can try and piece together what is happening perhaps.
But no promises. Again, without a standard CraftBukkit installation, things get tricky fast.
We have been having a slight problem with this plugin
Overall its works great, but for some reason it seems to 'add' players to the required amount over time. I'm not exactly sure whats triggering the extra count. We currently have it set to force daytime on 49% of players being in bed, if for example there are 10 players on and the plugin has been reloaded then it will report the correct number as 5 players needed. However as time proceeds the required number will increase until it eventually passes the number of players on the server.
We dont have the PlayerActivity jar installed, is this the reason why it seems to be losing count?
Were running FTB Unleashed, MCPC+ and Sleep 7.2.0.
@Durand1w
I quickly whipped something up that will allow you to specify the recognized material id and data for the block being used as a bed.
https://github.com/EdGruberman/Sleep/blob/master/dist/Sleep.jar?raw=true
You'll need to manually add an entry in your config.yml for the materials under the temporary section. Something like the following I suppose:
That will restrict the Temporary Bed feature to only work with the Sleeping Tent (which is what I see the Sleeping Bag makes in that mod: http://wiki.rikmuld.com/wiki/Sleeping_Bag )
This is all complete guesswork based on quickly reviewing the Camping Mod's code up on github. I can not guarantee any of this will work, but if you'd like to test it and confirm for me, I'll work to include this officially in the next release of the Sleep plugin.
I have actually been running Sleep without issues for 1.5 and 1.6 for MCPC+.
For the Camping Mod, we were hoping to use it for temporary beds as you said. I'm guessing that Sleep would need to have the option to add a different bed item, but also that I'll need to talk to the Camping Mod dev and provide a list of request/checks that Sleep needs to recognize the bed and also detect when the bed is removed.
@Durand1w
I can't guarantee this plugin will be MCPC+ compatible.
What exactly are you looking to support and how? Using the Camping Mod's sleeping bag as a temporary bed perhaps?
We just added The Camping Mod to our MCPC+ server. It has a different bed type, sleeping bag. I'm wondering if it would be possible to add an option to define different bed types in the config? I'll likely need to ping the Camping Mod dev as well so if there is any information on what Sleep is looking for in regards to beds/events, please let me know and I'll pass that along as well.
@Wbfw
I would recommend a permissions plugin like zPermissions: http://dev.bukkit.org/bukkit-plugins/zpermissions/
Then you can setup a default group to set sleep.user false as appropriate.
I setup my user permissions for all my plugins to assume that anyone installing the plugin will want to use the common/basic features by default. If you want something different, you'll need to use your favorite permissions plugin to adjust appropriately.
Thank you for customized effect in bed. I have a favor. Would you "permissions : sleep.use" set to default=false? I need to help.
Thanks for working to identify the Essentials conflict and adding in the new features! Players actually use beds again.
Thank you!
@Durand1w
I haven't heard of any issues, but anything is possible with plugin conflicts. I use the feature extensively myself with good success.
Can you list out your plugins and when I find some time I'll try and check them out myself?
Do you have any plugins that manage home locations or beds/sleep in any other fashion?
For the temporary bed, is there any trick or known issues yet? I rarely get the notice to break the bed and set my spawn back. When I do, it doesn't actually change my spawn back. I'm wondering if it may be conflicting with Essentials or if anyone else has played with the temporary location to recommend some tips/common issues/mistakes. Thanks for any info!
@CommodoreAlpha
Thank you for your patience!
I'd also like to hear from you in the future if you're able to piece together what is causing it. Sleep 7.1.1 should add the following log entries appropriately:
Hopefully that might allow you to identify what that particular player was doing that led up to that situation and what plugin might be causing it. If we can isolate it to a plugin I might be able to study that plugin code and see if I'm not compensating for a valid situation properly or we can perhaps notify the other plugin developer appropriately.
@EdGruberman
Nope, not running a modified version of CraftBukkit, but I do have many plugins running, so I'm never surprised when there's a plugin-related issue. And in this case, I probably suspect one of my many plugins to be the culprit, or maybe even more than one plugin.
Thanks for the update and response by the way.
@CommodoreAlpha
It shouldn't be due to resource problems. But plugins screwing around, yes. Somehow a player is suddenly no longer connected without a PlayerQuitEvent being fired. I can't remember if you are running a modded CraftBukkit or not? But that may even be the cause.
I'm going to try and get an updated version out this week that'll just ignore that will gently log that situation nicer. It's still a problem with your server somehow, but no reason to put a nasty stack trace you have to look at in your log either since it doesn't seem to impact anything else.
@CommodoreAlpha
I am getting the same error