Night accelerated based on # of sleeping

Discussion in 'Archived: Plugin Requests' started by Rich Boos, Mar 3, 2012.

  1. Offline

    Rich Boos

    Plugin category: General/Fixes

    Suggested name: MultiSleep

    A bit about me: I'm a server admin trying to maintain a multi-player server that behaves as close to single-player as possible. This means no /home, no /spawn, etc.'t for my members.

    What I want: One of the problems where smooth SSP doesn't fit in SMP is sleeping. It is either all or nothing to get the night to skip. In single-player you don't have to worry about any other players affecting the time (nor griefing your stuff, which we solve with regions) and there was a plugin that handled this but was very outdated and finally kicked the "bukkit" with the new changes in craftbukkit. It fast-forwarded the night based on the number of people sleeping divided by how many were online. So if 10 people were online and 4 of them were sleeping (40%) the night moved 40% faster.

    I would like a plugin similar to this but with some extra functionality for how staff are handled.

    Ideas for commands: No commands needed for this plugin.

    Ideas for permissions: A permission to ignore a player, or assume the player is asleep, however you want to look at it. This would be so tight using Duties, the must-have plugin for admins/owners who want to jump between work and play. I would use this permission node for staff on duty so they do not count against the awake-penalty when they are clearly handling the server needs.
    perhaps multisleep.ignore

    When I'd like it by: Yesterday, though obviously it'll take a while before anyone more than a few takes notice of this post, I'll keep bumping it. (Haha codename, this was a great posting template thanks)

    Similar plugin requests: None. - Getting search errors with forums so I could not find another request.

    Devs who might be interested in this: @codename_B Since he needs pizza and I have done business with him once before.
    Grimo likes this.
  2. Offline

    Rich Boos

    Bumping since my post is buried under requests that:
    1) The op didn't use search
    2) The op posted in the wrong category
    3) The op asked for something outside the scope of bukkit
    4) The op didn't follow the stickied template

    Bumping can't be any worse than that.. :)
  3. Offline


    this is a very cool idea. I might see what I can do for this... Ill keep you posted <3

    EDIT: Yea I can definatly Do this... I'll Post A Test Build Later Today... Id say around 6:00 PM EST
    Edit2: The test build wont have the permissions though.. So ill set it up to ignore OPs for now.
    eshep and Rich Boos like this.
  4. Offline


    Nice idea. I have the same kind of server as you. I will use this plugin for sure.
  5. Offline


    if it's not a trade exactly can you change the length of the cycle? my server users wanted me to make a plugin to shorten/lengthen the cycle, however i didn't think it was possible.
  6. Offline

    Rich Boos

    gus This is already possible with a few plugins, check bukkitdev.
    Similar to the one I am requesting, they work by doing the equivalent of /time add X, which makes your end-users see the sun/moon "jumping" ahead at an interval to meet your desired cycle lengths. There is no way to get around the jumpy nature without some meaty client modding.
  7. Offline


    im going to try doing this tomorrow.... theres somthing wrong with my math.. this is what i got so far

                double Perc = min / max;
                double NewTime = Perc + 1;
                double NewTime2 = 20 * NewTime;
                double NewTime3 = NewTime2 + Sup.getTime();
                long NewTime4 = (new Double(NewTime3)).longValue();
    Where min is the people sleeping, max is the people connected to the main world (not counting nether, ender world)
    20 is the time interval in seconds (the game speed is 20 per sec)
    where Sup is the main NORMAL world

    I just think my math is wrong.. it seems to be a little jumpy.. ill take a look at it tomorrow
    Rich Boos likes this.
  8. Offline


    ooooh. that's kinda messy. what if you cut down the intervals at which time was added or subtracted? it would make it appear smoother, i bet, but could potentially slow down the server.

    as a side note, how do i use the brackets easily? is there something i can click in the post to get the @[username]?
  9. Offline


    I would like to say I AM FINISHED with my test build. I will release it sometime tomorrow

    Sorry for the wait >.< lol I had some conflicts with using double vs int datatypes.

    Im not sure if its 100% accurate either... But it IS faster the more players that is sleeping.

    Ill release it tomorrow. The plugin will be called: SleepAway.
    Ill make sure to add u for credits for the Idea Rich Boos.
  10. Offline

    Rich Boos

    Nice, looking forward to testing it out
  11. Offline


    Sorry i havnt released it yet... Doing alot of college work and havnt had time finishing it. But iwould like to say its working. Im not sure HOW accurate my calculations are. But im satisfied with the results. Ill try to release it today. But for now, there will be no OP hidden thing. OPs will have to sleep as well until I completly finish it.

    EDIT: Heres the Thread The Plugin Will Be On Once I Get Home!
    >>> SLEEPAWAY <<<

Share This Page