[MECH]BedHeal v1.1 - Heals sleeping players [1000,1060,1185,1337]

Discussion in 'Inactive/Unsupported Plugins' started by Kostronor, May 3, 2011.

  1. Offline

    Kostronor

    BedHeal - Heals sleeping players
    [1.1]
    craftbukkit [1060,1185] (and probably every other build)

    This plugin is fairly simple, it just heals you when sleeping in an bed.
    no config, no permissions, no cake. Just a plain simple message ;)

    Features:
    • Heals you while sleeping
    • only heals when you are skipping the night!
    • Tells this to you
    • On startup, the plugin will check for if a new version is available
    download (dropbox + sourcecode) (v1.1)

    french translation thanks to @Xemnias
    Changelog:
    Version 0.1
    • initial release
    Version 1.0
    • Added the fix of only healing when skipping the night.
    • Because of multiworld, this plugin reads out the default world. so it only works on it.
    Version 1.1
    If you like my work:

    [​IMG]
    [​IMG]
     
    anchoredpirate likes this.
  2. Offline

    Horia0310

    Great! Please add dropbox download.
     
  3. Offline

    jamescosten

    Very simple indeed :p, will try this out thorougly and see if any bugs occur.

    Will keep you informed.
     
  4. Offline

    Kostronor

    I'Ve seen throught dropbox but i have no clue how to get the downloadlink :D
    Edit:
    Have added dropbox:)
     
  5. Offline

    kieranthethomas

    Thanks a lot for releasing this, man! I'd love to see the source code. :)
     
  6. Offline

    Kostronor

    Sourcecode is added in the Dropbox-version of it :)
     
  7. Offline

    Plague

  8. Offline

    kieranthethomas

    Loving the plugin, dude!
     
  9. Offline

    Sphax

    Is the amount of heal can be configured ?
     
  10. Offline

    Kostronor

  11. Offline

    placeboing

    Cool plugin, but is there any chance that you could make it so that players are only healed when they actually sleep overnight?

    At the moment, this makes the beds a bit too powerful in my opinion... at night time, you are basically carrying around an infinite health pack if you have a bed. If it only healed when the server switched to daytime from all players sleeping, that would be really cool.
     
  12. Offline

    BoKx

    ^^^^^^^^
    I agree 100% could you please add this feature?
    :D
     
  13. Offline

    Kostronor

    Well, i don't really know how to do this, i think i kinda check, if time is day when leaving, but will look at it if i find time(is on the mind-todo-list :D)
    edit, done doing that, was fairly simple, but only for the main world. i don't know how to get the world, the Player is actually in, so i search for the defaultworld in server.properties (level-name="worldiuse")
    if you need multiworld, i will add it on request/idea how to do.

    While testing out the plugin, i found out, that placing a bed in the wilderness and enter it wont help you, because every time you want to sleep, a mob spawns and attacks you. looks like they don't wnat you to use the bed to skip the night somewhere out of your house... :D

    i will add an update-checker in all my plugins, you can check the actual version here: http://bit.ly/lMW1BY

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

    Juze

  15. Offline

    Kostronor

  16. Offline

    Toros

    Hello, on Bukkit 818 and Bedheal v1.1 .. there is still a bug that you can get in the bed and click "leave bed" to allow for full heal. It also causes an error on server side which explains why. Thank you for this amazingly useful mod!

    Code:
    [SEVERE] Could not pass event PLAYER_BED_LEAVE to BedHeal
    java.lang.NullPointerException
        at org.bukkit.craftbukkit.entity.CraftPlayer.sendRawMessage(CraftPlayer.java:86)
        at org.bukkit.craftbukkit.entity.CraftPlayer.sendMessage(CraftPlayer.java:90)
        at me.kostronor.BedHeal.BedHealPlayerListener.onPlayerBedLeave(BedHealPlayerListener.java:34)
        at org.bukkit.plugin.java.JavaPluginLoader$23.execute(JavaPluginLoader.java:397)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at net.minecraft.server.EntityHuman.a(EntityHuman.java:702)
        at net.minecraft.server.EntityPlayer.a(EntityPlayer.java:318)
        at net.minecraft.server.EntityHuman.a(EntityHuman.java:340)
        at net.minecraft.server.Entity.e(Entity.java:937)
        at net.minecraft.server.PlayerNBTManager.b(SourceFile:183)
        at net.minecraft.server.ServerConfigurationManager.b(ServerConfigurationManager.java:108)
        at net.minecraft.server.NetLoginHandler.b(NetLoginHandler.java:85)
        at net.minecraft.server.NetLoginHandler.a(NetLoginHandler.java:33)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:91)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:401)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:311)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  17. Offline

    Kostronor

    well, for leaving bed, the plugin is checking if there is day in the default world, so this is not multiworld-compatible
    (could that be your issue)
    for the error, i'll look at it, but that seems more like a bug when sending the message to the player
     
  18. Offline

    Celtic Minstrel

    This plugin sounds like exactly what I was looking for, but I don't really see the need for the update checker.

    As for that error, I'd guess the player you're sending a message to is null.
     
  19. Offline

    Kostronor

    i think i don't really need it for this, because it will need less to no updates, but i just added it to like every of my plugins ;)
     
  20. Offline

    Churine

    Whenever I start my server it says it's working but it never heals us.
     
  21. Offline

    Kostronor

    this could be with your worlds are you in your main-world?
     
  22. Offline

    QChronoD

    Just wanted to bump that this appears to be working fine with the new 1.7.2 and CB953.
     
    Walliance likes this.
  23. Offline

    Kostronor

    thanks for the statement :)
     
  24. Offline

    Walliance

    Using CB953 I find that Bedheal is taking quite some time to start up. I get this message: "Bedheal is starting..." and then it takes a fair amount of time to start. It doesn't pose any problems, nor does it take enough time to get me angry but it does get a little annoying when you have to restart your server often (when installing plugins and such".

    Anyone else experiencing this?
     
  25. Offline

    QChronoD

    Not for me, takes about a second or two, about the same speed as all the other smaller plugins.
    (core-i7 @ 2.8GHz, win7-x64)
     
  26. Offline

    Tim619

    can you please add permissions because i want like in my server there is hobos i want other people to sleep getting healed but the hobos not so please permissions =D
     
  27. Offline

    Celtic Minstrel

    I'd also like the amount healed to depend on how long you slept; for example, if you go to bed right at dusk, you should be healed 10 hearts, but if you go to bed at midnight, you should only be healed 5 hearts. Also, could you change it so that entering and leaving a bed doesn't heal unless time is actually skipped? If there are multiple people on the server I can just right-click the bed and then click "Leave Bed" and I get healed.
     
  28. Offline

    Kostronor

    the second thing is already implemented, the problem is, i cannot check in which world the sleeping player is so i check, if it is morning(night skipped) in the default world defined in your server-properties.
    the idea of only healing how long sleep is good, would have to think a bit about balancing it to no require to sleep the first second to heal 10 hearts, but thats in mind:)
     
  29. Offline

    Celtic Minstrel

    Well, checking default world works for me in particular, since I only have a normal, a nether, and a sky, and beds won't work in the latter two anyway... :/
     
  30. Offline

    Stephen304

    CB1000 Players can leave the bed immediately after getting in bed and still heal. Allows players to carry a bed during night and hop in to heal without actually skipping night.
     

Share This Page