Inactive [MISC] AnyoneSleep v1.3 - Any player sleeping skips the night [935]

Discussion in 'Inactive/Unsupported Plugins' started by R3ality, Apr 13, 2011.

  1. Offline

    R3ality

    AnyoneSleep - Any player sleeping skips the night!
    Version: v1.3 (CraftBukkit build #935)

    This small plugin allows ANY player to skip the night time of the server by sleeping in a bed (without having to wait for ALL other players to get into beds aswell). If some of the players are AFK (or deep in their mines without a bed) other active players don't have to endure night time while waiting for everyone to use a bed.

    Features:
    • Any player can skip the night by sleeping in a bed.
      • No need to wait for any other players to get into bed.
      • Multi-world support. Sleeping is world-based!
    • Support for the Permissions plugin (tested with 3.1.5b and 2.7.4, usage is optional)
      • Multi-world permissions support (including nether)!
    • In-game commands
      • To check current status of the plugin
      • To enable/disable sleeping altogether
    • Uses a configuration file to persistantly keep settings.
    Download: [​IMG] AnyoneSleep v1.3 (.jar only)

    Installation:
    • Download and place "AnyoneSleep.jar" file into the "plugin" directory of the server.
    • Start/restart the server to have the plugin loaded (or use a plugin manager)
    • (optional) Make changes in the configuration file
      Read the "Configuration File" section below for details..
    • (if using Permissions) Grant desired permission nodes to users or groups
      Read the "Permissions" section below for details..
    Commands:
    Permissions / Configuration file:
    Show permissions and configuration info (open)
    Permissions:

    Permissions plugin usage is optional. If you are not using it the plugin will default to using the regular "ops.txt" (all commands will be enabled for all ops). If you are using permissions but you do not want it to apply to this plugin there is an option to make the plugin "static" via the configuration file (read below)

    The plugin utilizes the following permission nodes:

    anyonesleep.toggle - allow player to toggle sleeping for the server
    Commands enabled: /as toggle

    Special additional permission:

    anyonesleep.cansleep - allow player to sleep even if sleeping is disabled for the server

    _____________________________________________________

    Configuration file:

    In case the configuration file doesn't exist it is created automatically with default values when the plugin is loaded. This means you probably don't need to worry about it at all!

    Configuration file uses the .yml format (no tabs and be careful with spaces!) and will be at "plugins/InstaBreak/config.yml". The default (with added comments) is as follows:
    Code:
    config:
        dynamic: #These dynamic configuration settings can be changed with in-game commands aswell (read more in the commands section above).
            enableforall: true #When set to "true" any player can pass the nigth using a bed. When set to "false" only ops (or players with special permission node) can sleep!
    Changelog:
    Show changelog (open)
    AnyoneSleep v1.3, released on June 19th
    • Fixed multi-world sleeping!
      Plugin should now correctly handle a situation if two players in different worlds sleep at (roughly) the same time.
    • Word-based announcement
      "Player took a nap" message is now world-based (as opposed to being server-wide).
    AnyoneSleep v1.2, released on June 17th
    • Made sleeping non-instant!
      Player will sway in bed for roughly 5 seconds. Mobs can disrupt sleeping
    • Added in game commands!
      Command to disable sleeping for the whole server in case admin wants it to be night time. This can also be set in the configuration file.
    • Added Permissions plugin support!
      Check the "Permissions" section above for more details..
    • Added a configuration file!
      This plugin now utilizes a configuration file to persistantly keep settings. Check the "Configuration file" section above for more details..
    AnyoneSleep v1.1, released on May 11th
    • Fixed the two issues explained in detailed in this post here.
    • Added a server-wide announcement in case a player sleeps to pass the night.
      This will only occur if there are more than one players in the server..
    • Plugin no longer depends on the isSleepingIgnored() feature added since CraftBukkit #671
      Should work with any CraftBukkit version..
    AnyoneSleep v1.0
    • Initial version
    Known issues / Future ideas:
    Show issues and ideas (open)
    Known issues:
    • Non-sleeping players (who have never slept in a bed) get a number of mobs spawned around them. fixed in v1.1
    • Players (who have their spawn point set to their bed by sleeping) get teleported to their beds if time skips to the morning (in the result of any random player sleeping). fixed in v1.1
    Future ideas:
    • Make a server-wide announcement if the night is skipped by a player sleeping (and who) done in v1.1
    • Maybe implement functionality to disable sleeping for some players (in case someone abuses it)? not needed since v1.2
    • Make sleeping more like the un-modified sleeping (fade to black, stay in bed longer, allow mobs to disrupt sleeping) done in v1.2
    • Make sleeping toggleable by in-game command done in v1.2
    Like this plugin?
    Why not make a donation to show your support! Any amount will be appreciated! :)
    [​IMG]
     
    heblol and Pim1234 like this.
  2. Offline

    xGhOsTkiLLeRx

    @R3ality

    Ok, I hope you can fix all the bugs in the next release!
    I can't wait to see your awesome plugin!
    If you need a test server or test persons contact me - if you want!

    Greets
     
  3. Offline

    xGhOsTkiLLeRx

    I don't want to bump to often, but any progress?
     
  4. Offline

    R3ality

    New version..
    ..I decided to stay true to the initial concept of this plugin and NOT add any of the restricting factors that have been discussed above (sorry :oops:). Using this plugin will still skip time to the morning in case ANY (one) player sleeps in a bed.

    To everyone that was requesting percentage based (or similar) required number of sleeping players, I suggest you take a look to another very promising plugin in the same field: SimpleAwaySleep
    (which is also partly the reason I decided not to implement a similar approach - someone beat me to it. Good work EdGruberman :))

    To anyone that still likes the (HIGHLY) simplistic approach of this plugin, I now also added a direct download link to the .jar file: http://dl.dropbox.com/u/26527175/AnyoneSleep.jar
     
    NachoDuck likes this.
  5. Offline

    xGhOsTkiLLeRx

    Yes! Thank you :D
    I want only the simple version of your plugin!

    For the time I used SimpleAwaySleep, but I guess this is the better plugin for me :)

    Greetings
     
  6. Offline

    R3ality

    Tested with CraftBukkit build #818 for Minecraft beta 1.6, seems to work fine..
     
  7. Offline

    xGhOsTkiLLeRx

    Can confirm that, it's working great!

    Suggestion:

    You could add that you have to stay longer in the bed (like the bed in SP, maybe a little bit shorter) to skip the night?! ;)
     
  8. Offline

    R3ality

    Checked against CraftBukkit build #860. Seems to work fine!
     
  9. Offline

    Draxus

    I'd love it if this could be made to follow the normal beds rules. As it stands I can throw a bed down while a bunch of mobs are chasing me and instantly make it day. I'd prefer the typical fade to black + chance of monster attack when sleeping.
     
  10. Offline

    R3ality

    @xGhOsTkiLLeRx and Draxus: Good idea, done! :D

    So here's a new version..
    Basically adding a lot of fluff (commands, permissions, configuration file) to enable more possibilities for future development but still trying staying true to the initial concept..

    Enjoy! :)
     
  11. Offline

    Draxus

    Awesome! This plugin is now perfect for me, thanks for all your work! :D
     
  12. Offline

    xGhOsTkiLLeRx

    Thanks :)
    But sure, it's may?
    I thought we have June?

    :p
     
  13. Offline

    R3ality

    Damn time flies :D Fixed, thanks..
     
  14. Is it possible to do it like this:

    When you have multiple worlds that "Player <blaablaa> took a little nap" text only appears in the world there that player <blaablaa> took that nap? I hope you can understand what I am trying to say :p

    Also, it would be great if you could add one more dot after "nap" (so its nap...) or remove one :p
     
  15. Offline

    R3ality

    @Tumpo: Good point! In fact multi-world support in general was a little broken. If two players in different worlds went to bed roughly at the same time (Player A went to bed a few seconds earlier than Player B), then only Player A-s world would skip to morning! This should now be fixed along with the message :)

    New version..
     
  16. Offline

    Popa611

    Every time I sleep it crashes minecraft :( It also crashes ONLY to me when other player sleeps... any help?
     
  17. Offline

    R3ality

    That is rather odd. So you're saying the server is running fine just your client crashes? More information on your client/server setup would be nice..

    I'd suggest trying a vanilla (clean and unmodified) minecraft client. Rename the ".minecraft" folder at "C:\Users\{USERNAME}\AppData\Roaming" to something else and then launch like usual.
     
  18. Offline

    R3ality

    Tested against CraftBukkit build #928 #935. Seems to work fine!

    EDIT: Another recommended build! CraftBukkit #935
     
  19. Offline

    Bronski

    My users are reporting that sometimes it doesn't work for them at all. I double-checked and they have permission. I didn't see an error in the console window. I'll report back if I figure out more.

    They do love this plugin though :D

    CB860

    EDIT: It just happened to me a minute ago. The first time it just faded and I stayed there. Then I got back in the bed and it worked.

    EDIT2: A user claims they can make it work when it's not by picking up and replacing their bed.
     
  20. i dont know why but sometimes this wont work, i got permissions for all use and true in config.
     
  21. Offline

    Bronski

    Yeah it has issues. I'm on 935 now, btw. I think it was still doing the same :(
     
  22. it doesnt work correct. Sometimes it skips night and sometimes not.
    Btw any1 know good replacer for plugin: VehicleExit, exit a vehicle and it picks the vehicle to ur inventory automaticly.
    Cant find this plugin anywhere anymore :(
     
  23. Offline

    PyPKjE

    It would be great if you update and insert Cvars that will determine how much a player has to sleep, or as a percentage of the player :rolleyes:
     
  24. Offline

    CoD511

    Love this plugin, run a small no-cheating/commands server with a few guys and this is the plugin they love most :)
     
  25. Can you add costum message ?
     
  26. Offline

    Klawful

    Could you change this, so that if say 50% of server is in bed, it skips to daytime. If under 50%, it doesnt.

    And have that 50% able to be changed, to any number. Then this would be perfectly feasible and fair for large servers, some have upto or over 100 players.
     
  27. Offline

    dagasc

    How can I change the color and text that appers when somone sleeps? "player tok a nap, blabla."
     
  28. Offline

    Pim1234

    euhm... it would be nice if this supported permissionsbukkit...

    and if i could only disable it for one world...
     
  29. Offline

    jespertheend

    works for 1.8 :D
    how can I change the message. I want to change the language
     
  30. Offline

    PAL-18

    I dont know if this is a feature of this plugin or not - but no one can use beds when they dont have the permission to skip the night while sleeping. I want my regular users to still be able to use beds, but not be able to make it day if everyone isin't sleeping - but i still want my donator group to be able to skip the night if they sleep in a bed.

    Can you add this?
     
  31. Offline

    xGhOsTkiLLeRx

    R3ality

    Hope to see an update for the new event system! :)
     

Share This Page