[MECH] SlowHealth v3.2 - Auto Heal/Hurt Multi-World Permissions [1060]

Discussion in 'Inactive/Unsupported Plugins' started by ACTruncale, Jan 19, 2011.

  1. Offline

    ACTruncale

    SlowHealth v3.2.0

    Download: SlowHealth.jar
    Source included in JAR

    NOW WITH MULTI-WORLD AND PERMISSIONS SUPPORT
    NEW: ADDED BED HEALING


    Version:
    - v3.2.0 tested with CraftBukkit #122-1060​

    Description:
    - Adds health (configurable) every second (configurable) to players on the server.
    - Can hurt player if you make regen-amount negative
    - Can set maximum amount SlowHealth will heal the player by
    - Can set minimum amount SlowHealth will stop hurting the player by (if you set regen-amount to less than 0
    - Can set the starting altitude that slow health with start working
    - Multi-world support
    - Permissions support

    Instructions:
    - Save SlowHealth.jar to plug-in folder
    - Start and stop server to allow Slow Health to create the needed files.
    - Inside your plug-in folder there should be a SlowHealth Folder with three files
    - default.properties
    - world.properties (or whatever your default world is in your server.properties file)
    - WORLDLIST.txt
    - If you only have a single world just change the settings in your worlds property file.

    Adding Worlds to Slow Health:
    - For every world you have add the world name in the WORLDLIST.txt file. One world per line.
    - Run the server and let it create the properties file, then edit it to your liking.​
    - Any world not on the WORLDLIST.txt will use the setting in the default.properties file.​

    Customize Slow Health:
    All values must be in integer form (whole numbers)​
    - regen-rate:1
    - This value is how fast SlowHealth will heal you in second.​
    - regen-amount:1
    - This is how many 1/2 hearts SlowHealth will heal you for.​
    - Set this to a negative number to hurt the player :eek:
    - regen-max:20
    - Controls at what value SlowHealth will stop healing.​
    - regen-min:0
    - This is used if you are hurting the player instead of healing them.​
    - Controls when your stop hurting them. 0 will lead to death.​
    - regen-altitude:0
    - If a player goes below this depth, the will no longer be healed.​
    - Used if you want to make underground harder.​
    - sleep-heal:20
    - When players sleep through the night they get healed this amount.​

    Permissions:
    If using permissions use the node 'slowhealth' for everyone you want to be affected by this mod. Permissions is not needed to use this mod, Slow Health will default to everyone getting healed if not installed.​

    To be added:
    - Fix the plug-in to work if properties is set to spawn-monsters=false.
    - An option to have slow health heal you after a set amount of time after you take damage​
    - An option to heal you only when you are standing still (probably will be mutually exclusive of above option)​
    - Heal only when light is above a certain level​
    - Console controls to edit settings 'on the fly' (will support permissions)​
    - Suggest more please...

    Credits:
    - Code modified from Silence's SimpleGod code and Protected's SlowHealth 1.0.
    - Also credit to feverdream, Drakia, Edward Hand


    Change Log:

     
  2. Offline

    DiscipleGeek

    I'd like to be able to set up health regen when a player stands still for x seconds. Could you add this as an option?
     
  3. Offline

    ACTruncale

    I could add an option to only heal while standing still, or did you want 2 different healing rates?
     
  4. Offline

    DiscipleGeek

    The only healing while standing still is exactly what I want. :) I was hoping for a delay for it to start (stand still for 5 seconds, then the healing kicks in) but I can just lengthen the intervals between healing ticks.
     
  5. Offline

    giding

    Could you add a possibility to have different hp regen amounts and rates on different amounts of hp?

    For example, the regen amount would be -1 when the player has more than 6 hp and +1 when the player has less than 6 hp. This would be awesome...
     
  6. Offline

    TheDaddyPeanut

    Do this work on multiple worlds??
     
    Junubee likes this.
  7. Offline

    Junubee

    I actually came here to request what TheDaddyPeanut said. It might be a good idea to make a yaml file for all the changes if even a few of the suggestions come into effect, I would love Multi-World support. Regens half your health over time while in the main world, nothing in Nether, and on my desert wasteland map, slowly lose health (the trade-off being way more gold and good things to find in the ground below.)
     
  8. Offline

    Tom Savage

    Amazing job. Looking forward for more advanced customization. A must for any server.

    Perhaps more/less health regen based on what armor a person is wearing?
     
  9. Offline

    amplifier

    This threads contains some really good suggestions to make THE ONE health control plugin out of this one.

    -add a damage-cooldown, that you have to wait after being damage until the healing starts
    -add different healing rates and amounts depending on your chars current state (standing/moving, light level, per-biome-setting)
    -integrate Permissions to group control all above mentioned things
    -[insert suggestion here]
     
  10. Offline

    TheDaddyPeanut

    Omg men why dont you add Multiworld support?
    If it had Multiworld support i would download it emediently, so im waiting.

    + there are more ppl with good idea's here and i haven't seen the ''ToDo'' list change lol?
     
  11. Offline

    hedger

    is it possible to have the regen only occur in specific areas?
     
  12. Offline

    rct2guy

    I'm sorry I have to do this, but Bukkit told me to...
    Code:
    2011-02-22 07:52:08 [WARNING] Using the stupidly long constructor adam.SlowHealth.SlowHealth(PluginLoader,
    Server, PluginDescriptionFile, File, File, ClassLoader) is no longer recommended. Go nag the plugin author of
    SlowHealth to remove it! (Nothing is broken, we just like to keep code clean.)
    NAGNAGNAGNAGNAGNAGNAG
     
    FabianN likes this.
  13. Offline

    Daveyo

    Working for 1.3 cb 432 Yahhhh
     
  14. Offline

    Fugensnot

    *excitedly* I have a suggestion! :D How about a warm-up time before healing actually starts? So players aren't healing during combat? I dunno, like start a timer when a player is hurt then when the timer reaches a certain time, the healing kicks in?
     
  15. Offline

    rct2guy

    I don't think your plugin is compatible with the latest build. I'm getting this error:
    Code:
    18:24:51 [SEVERE] Could not load plugins\SlowHealth.jar in plugins: null
    org.bukkit.plugin.InvalidPluginException
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:80)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:129)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:94)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:59)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:191)
            at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:131)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:246)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    Caused by: java.lang.NoSuchMethodException: adam.SlowHealth.SlowHealth.<init>()
            at java.lang.Class.getConstructor0(Unknown Source)
            at java.lang.Class.getConstructor(Unknown Source)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:75)
            ... 8 more
     
  16. Offline

    Shados

    Here's a copy with that fixed. Weirdly enough, while the changelog says he fixed the problem, it certainly didn't work and the included source said otherwise. Go figure?
     

    Attached Files:

    rct2guy likes this.
  17. Offline

    ACTruncale

    I don't know what y'all are talking about it, works fine with #452 (just tested it). Maybe Dropbox failed for me? In any case I uploaded it again.

    As for the many suggestions above I will look into it soon. My time is divided between writing a new mod (sorta of like Towny but simpler), work and helping my wife with our new baby.

    If anyone wants to work on improving on the code feel free! I'll give credit where credit is due.
     
  18. Offline

    godgodgodgo

    where is the properties file? I don't think I have one
     
  19. Offline

    enkryptor

     
  20. Offline

    ACTruncale

    server.properties file. Should be in the root of your folder.
     
  21. Offline

    godgodgodgo

    Oh right I thought you were talking about a plugin properties file. Thanks
     
  22. Offline

    Noppoly

    Ah, that would be exactly what I'm looking for for my server! Builders or explorers can regenerate health slowly, but you're out of luck exploring caves and mining. If anyone makes a plugin that allows configuring this, or if ACTruncale updates his to allow this, I'll be right on it. That'd be great. o:
     
  23. Offline

    GDorn

    Because the code is GPL and included in the .jar file, I created a fork on github. The fork adds the configuration option "min-altitude" below which the plugin does nothing.

    ACTruncale, I'm giving you credit for the plugin in the github README. I also noticed you have an empty repository for SlowHealth. If you feel like setting that up, I'll rebuild my fork from your repository and submit pull requests/etc back to you. I have no interest in stepping on toes, just want to contribute.

    Anyway, the github repo is here:
    https://github.com/georgedorn/SlowHealth

    The jar file is here:
    https://github.com/georgedorn/SlowHealth/raw/master/dist/SlowHealth.jar
     
  24. Offline

    Noppoly

    AWESOME. I'll start using this right away. Many thanks to both you and ACTruncale! :D
    [torch]
     
  25. Offline

    xXBlacksmithXx

    fix this for build 493 plz :O our surver loves this
     
  26. Offline

    Baythan

    I am running build #493 of bukkit and a re-download of SlowHealth v2.3 loaded just fine.
     
  27. Offline

    shardbearer

    I think this would be great as an impromptu hunger device, with your health going down constantly but really slowly.
     
  28. Offline

    gdscei

    Could you make it so you can set a specific area with like WorldEdit's wand and then set there a value of regen, so it only works in specific areas, or maybe even damage the player in certain areas, maybe to recreate ideas like radioactive areas?
     
  29. Offline

    Cryoffun

    I really support cuboid regen (I'd use it in my pvp zones so people don't regain too much)
     
  30. Offline

    Grungeud

    Hey, there; Haven't read all the posts.
    So, my suggestion is (if possible): Control max health of a player/group.
    I have suggested this in other threads.
    I don't know how to code, but can it be done? I tought of some logic, like, if that player has more than his stablished max health, he would be given certain damage to set his life to maximum health. Maybe it could be done something like: if he gets more than the max health set, he gets fully healed, then hurt in the amount to set his health to maximum. I don't know if I explained it right, english is not my first language and I'm praticing it the past few weeks (due to mc ^^). I would need this customizable health for a RP server I'm developing.

    Good job with the plugin, btw.
     
  31. Offline

    rct2guy

    I don't know if this is what you're suggesting, but I would like to be able to have health regenerate for some players and not for others. Some of my users want more of a challenge, and don't like having SlowHealth enabled, but others can't live without it (no pun intended). Enabling a feature like this would be sublime.

    Another feature I'd like to request would be to have configurable options between worlds. We were thinking of maybe having a world with a slower regeneration rate that would also have heightened difficulty, to make for a challenge, and put emphasis on the "Survival" of SMP.

    Thanks for taking these ideas into account, and my server's users and I both thank you for the plugin.
    [MERGETIME="1300045615"][/MERGETIME]
    An easy way to implement both of these ideas is to have SlowHealth support Permissions (since Permissions supports different settings for multiple worlds). That way, you can have it on for some worlds, and off for others, and on for certain users, and off for others. But I don't know if SlowHealth can work like that, or if Permissions only supports commands. Maybe a command that turns SlowHealth on and off?
     

Share This Page