Beds that heal you!

Discussion in 'Archived: Plugin Requests' started by kieranthethomas, May 2, 2011.

  1. Offline

    kieranthethomas

    I have a simple request, and it shouldn't be hard to add. It is, as you can probably tell, healing you if you sleep in a bed.

    C'mon, who doesn't want this feature? :D
     
  2. Offline

    GamerX

    I can try to look into this
     
  3. Offline

    kieranthethomas

    Thank you so much, man :D

    It is possible, right?
     
  4. Offline

    Killie01

    i ain't a plugin developer but i think:
    when player goes into bed you set the health
    and setting health is easy
     
  5. Offline

    Daniel Heppner

    If you'd like me to make this, feel free to message me. I'd like to build it into my upcoming plugin pack.
     
  6. Offline

    kieranthethomas

    I'd love for you to make this!
     
  7. Offline

    captainawesome7

    @Killie01 Actually, setting health to full is as easy as
    player.setHealth(20);
     
  8. Offline

    Killie01

  9. Offline

    kieranthethomas

    So I could pretty much do it myself?
     
  10. Offline

    captainawesome7

    Well, you would need to go here and poke around at what you can use in the plugin.
     
  11. Offline

    kieranthethomas

    I literally have Eclipse open with Bukkit imported externally. What do?
     
  12. Offline

    captainawesome7

    Go watch samkio's tutorial.
     
  13. Offline

    chernobyl360

    ok your gonna need to add the imports.

    then try and make the plugin i guess *connect* to the server. from what ive seen its called pluginmanager.

    im guessing these are the major imports you WILL need. im not 100% sure how to setup the way it connects. ive been told about 3-4 different ways.

    import java.util.logging.Logger;
    import org.bukkit.event.Event;
    import org.bukkit.event.Event.Priority;
    import org.bukkit.plugin.PluginManager;
    import org.bukkit.plugin.java.JavaPlugin;

    his tutorials are cool. but not very well planned. some what rushed :/ ive been trying to learn java off of old deprecated plugins. i like to try and update them and see if they will run :D

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

    kieranthethomas

    I have been doing that since before I even asked. I just like to justify that I'm doing the right thing. I was. :cool:
     
  15. Offline

    chernobyl360

    cool :D. hope to see some cool plugins from you then :D
     
  16. Offline

    GamerX

    Plugin is done, just going to get some sleep and then I'll give ya a link ;D
     
  17. Offline

    kieranthethomas

    Thanks, dude :D This is really confusing at the moment, but I think I just might take his source code, and adapt it into BedHeal.

    It is getting kinda late, I should probably wrap up for the night soon, want to finish writing the plugin, though.

    Haha, can't believe you finished it, while I'm here wondering what type of event I should use for when a player enters a bed.

    I applaud you, sir! :D I'll definitely poke around at the source code.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 14, 2016
  18. Offline

    GamerX

    I'm sorry, but I was so smart when I were tired, almost sleeping, that I forgot to save my project.
    So nothing got saved, I got no time tomorrow, but the days after tomorrow I'll have to to make it again =O

    One tip to all of you guys, Never EVER! code when you are almost sleeping :D
     
  19. Offline

    chernobyl360

    lol ok? anyway you look at it if you were using eclipse, it warns you if u didnt save. the only way to loose your project is if you hard restarted your pc :/
     
  20. Offline

    GamerX

    Well, my pc froze, damn you not-unix-os, and i couldnt save any projects :'(
    But just ask me if you want to try to make your own plugin, I'm gladly to help :D
     
  21. Offline

    valdark

    SlowHealth already does this... you can turn off it's other healing method in the config.
     
  22. Offline

    Philip Blair

    I will add this to my server if it gets released.
     
  23. Offline

    kieranthethomas

    Yeah, I'd really like to start making plugins :) I'm very, very beginner with Java. Thanks for the offer, dude. If you re-do the plugin, I'd definitely look at the source, and if not, could you please explain how I could do it myself? :D
     
  24. Offline

    Kostronor

    I'll just start making this plugin, will see if i get this to work:D
    Edit: Done Coding, im testing it now and releasing then
     
  25. Offline

    GamerX

    I'm wondering, do you giva a player full health when he right clicks the bed? Or will it heal after a time inside the bed?
     
  26. Offline

    Kostronor

    If a player sleeps, he gets his full life back.
     
  27. Offline

    GamerX

    Well, that means he gets full health instantly? Right?
    Not to complain, not very hard coded though, btw I got time to redo plugin, maybe one hour left to work on code (I'm watching The Simpsons while I'm coding) =P
     
  28. Offline

    Kostronor

  29. Offline

    GamerX

    Maybe something like slowhealth got, heals over time
     
  30. Offline

    Kostronor

    like said before, why?
    i have no clue why it should only heal slowly, because after one sleeping (which is limited in time) it becomes day(so no second sleep) there are two cases (it heals all in the given time/or not) this could also be added by only adding perhaps 5 or 2 lifepoints per sleep. no need for any timing here :p
     

Share This Page