[REQ] Advanced Sleeping System

Discussion in 'Archived: Plugin Requests' started by mrsagency, Dec 23, 2013.


Is this a good idea?

  1. Yes

  2. Nope

  3. Semi

  1. Offline


    What does it do:
    - NEW! Energy System
    Acts like a timed duration, a player with energy system will drain energy bar per minute (standing counts) This system is not affected by activities that drains hunger bar(sprinting/breaking blocks/jumping/etc.) It's just a plain independent timer by itself.

    Why it should be made:
    To PvP/Survival Servers, this is a nice plugin. Since we know beds are so useless in multiplayer(except set our spawn point), how about use beds to limit our players to have periodical active time and use the bed to past the night?

    To refill it, there is two ways:
    1. Sleep: Sleeping on a bed to refill the bar over time, once the bar is fulfilled, you will be automatically waked up. Restoration Rate is 200% faster than Meditation. A method to sleep on a bed but not affecting the spawn point is, type /sleep and right click on a bed. This way will not affect spawn point changes.
    2. Meditate: If you don't have a bed, use Meditation to restore your lost energy. To Meditate. you need a half slab(any kind, a list will be shown for effectiveness of every slabs) Next, type /Meditate and right click on a half slab to Meditate on it. (Sitting animation on a half slab)
    WARNING: You will still get attack by environmental factors/monsters/players, and the Meditation is halted.
    Meditation Conditions:
    - Energy Bar must not less than 5%(Less than 5% requires a bed)
    - Find a suitable place to Meditate, or you will be attacked
    - *Meditation can be operated on day time, but it is less effective than sleeping on beds
    - *Meditation can be stopped with command(/Meditate) when he/she is currently Meditating.

    Here's a list of slabs against the effectiveness of restoring energy:
    Sandstone Slabs/Smooth Sandstone Slabs: Ignores monsters' attacks when Meditating, but PvP damage will not be ignored.
    Cobblestone Slabs/Stone Slabs/Stone Brick Slabs/Brick Slabs: 75% Energy Restore Rate
    Wooden Slabs: Normal Energy Restore Rate
    Nether Brick Slabs: Gives X seconds of fire resistance depends on how many seconds you Meditate
    Quartz Slabs: Restores health and hunger slightly when Meditating(very slightly restoration only)

    Another cool thing about Meditating is, randomly Meditating will have tiny chance to generate rare items such as diamond/nether star etc.(Remember, it's very tiny)

    And now, for the punishment for those who doesn't know the importance of resting!
    If your energy bar drops to 0, there is 4 options for server owners to choose from:
    1. Collapse: The player collapses on the ground(sleep animation), having 75% of restoration in energy until 50% of max energy is recovered. In collapsing period, the player cannot move and all damages will not halted the process. The player may die if their health is depleted(directly respawn)
    In my opinion, this is good for PvP hardcore servers, so players can ambush the collapsed player without any strength :D Players have to watch their energy bar or they will suffer the collapsing period and the hazard of being killed.

    2. Black Out: The player suffers slowness and blindness effects when energy bar runs out. However, the player can create a half slab or bed in this period to restore the energy. The player can also be ambushed easily if he is so stubborn to continue his journey.

    3. Combination: This one is the cruelest, the player suffers "Black Out" when he remains 10% of his energy, but he encounters "Collapse" when the energy bar depleted.

    4. Death: You know, death is the least suffering way to start over. Death restores all the energy and you're respawned. This method doesn't guarantee your precious items :(

    Or...you can choose nothing.

    And now, for the best part of everything...
    Potions! (Custom Items)
    - Potion of Energy: Directly restores X portions of the energy bar

    - Apples will have slightly chance to restore some of the energy.
    - Golden Apples will restore X% of energy over X seconds.
    - Sleeping and Meditating will be interrupted on disconnections. (A good way to keep them active if there is a AFK kicker)
    - During Meditating, chat and inventory management is allowed. (You just can't move)

    Achievement/Ranks: (Customizable)
    - Meditation for X minutes will give a set of items to specific player.

    That's all, I hope someone reads and makes this...sorry for the mess...
    WarmakerT likes this.
  2. Offline



    1. 1.​
      administer medicine or a drug to (someone).
      "both infants were heavily medicated to alleviate their seizures"
  3. Offline


    ......It's "Meditate"
  4. Offline


    Bump...(I don't mean it!)
  5. Offline


    This sounds incredibly interesting. If no one has contacted you about making this yet, let me know and I will most likely do this. :)
  6. Offline


    Thanks for your support, I will appreciate that :D
  7. Offline


    Wow, it seems like an awesome plugin, and I would really like to make it, but I'm not that good ...
    I'll see what I can do and post my code here for the other coders.
  8. Offline


    Thanks for your support :D
  9. Offline


  10. Offline


    I can't think of a way for this to be done without packets (referring to the sitting)
  11. Offline


    Similar to this: https://forums.bukkit.org/threads/lib-animationlib.172449/

    Hmm... Anyone can help make this plugin?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 5, 2016
  12. Offline


  13. Offline


    Oh my god don't bury me!
  14. Offline


    mrsagency This is certainly an interesting concept I will give it a shot :) if I have time : /
  15. Offline


    I'm pretty sure there's not a way to cancel the time change event from sleeping, nor a way to cancel the player getting out of bed.
  16. Offline


    Decent idea. The name... probably shouldn't go with "A.S.S." and instead use something simpler like "meditate" or similar.
  17. Offline


    Actually, the sleeping doesn't change the time(like normal sleeping), it may just only a sleeping animation on certain coordinates above the bed block.
    (If the sleeping event can be used in any time)I believe it is possible to cancel the player from getting off the bed, like teleports(/tp), breaking the bed(not very recommended as it may affect /home plugins) or change time(/time set)
  18. Offline


    (Accidently) Bump
  19. Offline


    You...posted that by accident?
  20. Offline


    i like the title actually, but you still shouldn't name it that for the purpose of keeping bukkit a clean place :)
  21. Offline


    For creativity!
  22. Offline


  23. Offline


    I want to bump this, sounds cool.
  24. Offline


    I am going to see if I can do this. The sleeping stuff is fairly simple, not so sure about having a meditating animation though... You could just force players to use a bed, it makes it more challenging, and night comes every 20 minutes.
    So lets just summarize:
    - Energy bar (basically how tired you are)
    - Drains slowly over time (not effected by sprinting etc)
    - Going in a bed will quickly restore energy
    - If the time changes to morning then it is fully restored
    - Meditation will slowly restore it
    - You can sit on some items (e.g. slab) to meditate
    - Eating special items (e.g. golden apples) will restore X amount of energy.
    - COLLAPSE - Health is converted into energy (until energy reaches 50%) - may be lethal
    - <10% = blackout (blindness+slowness)
    - 0% = instant death?
  25. Offline


    Okay now I want to correct the red lines above:
    1. Meditation animation = sitting animation(such as sit on minecart/boat)
    2. The bar is restoring over time, and time changing DOES NOT AFFECT the recovering, it DOES NOT FULLY RESTORED when the time is set to morning.
    3. Punishment can be chosen from these 4 options: Collapse, Black Out, Combination(which is Collapse + Black Out), or death when energy bar is depleted. [P/S : If you're still confusing, read the punishment section again]
  26. Offline


    Why this thread needs a "bump" to have more comments?
  27. Offline

    timtower Administrator Administrator Moderator

    Devs need to like the request before they make it. And using packets isn't something that everybody is capable of
  28. So do you want something like stamina and if you use a bed it restores and when you run, walk, jump or something similar you looss a bit of the stamina?
  29. Offline


    It's not about stamina, stamina = hunger bar

Share This Page