Increase a players max health

Discussion in 'Archived: Plugin Requests' started by mafumeaade13, Apr 1, 2013.

  1. Offline

    mafumeaade13

    Suggested name: MaxHealth

    What I want: I am making a server and am creating donations. I would like players to be able to donate and receive a max health increase based on how much they donated. You would be able to increase and decrease the players max health with command. I would also like the players health to be displayed with the new scoreboard system as well as above a player head. Would also work with /heal

    Ideas for commands:
    • /mHealth increase {Player} {Amount}
    • /mHealth Decrease {Player} {Amount}
    • /mHealth Set {Player} {Amount}
    • /mHealth View {Player}
    • /mHealth Reset {Player}
    • /mHealth Reload
    • /heal (Already with other plugins, but compatible with all new hearts)
    Ideas for config:
    • Max health: {Number} -Sets max health a person can have
    • Min health: {Number} -Sets minimum health a person can have
    • Heal amount: {Number} -Sets /heal amount
    Ideas for permissions:
    • mMealth.change -ability to set, increase ,decrease, and reset health
    • mHealth.view -ability to view a person's health
     
    justcool393 likes this.
  2. Offline

    Jaitiso

    looked into it and, i think i got it lol
    Command changes

    • /Hincrease {Amount} {Player}
    • /Hdecrease {Amount} {Player}
    • /Hset {Player} {Amount}
    • /Hview {Player}
    • /Hreset {Player}
    • /mHealth Reload <--- No idea what that does (reloads plugin?)
    • /heal {Amount} {Player}
    • /heal {Player} <--- Other plugins have this
    • /Hadder
    • (UP ONE) shows the help
    • PERMISSIONS
    • healthadder.hincrease
    • healthadder.hdecrease
    • healthadder.hset
    • healthadder.hview
    • healthadder.hreset
    • healthadder.heal
     
  3. Offline

    mafumeaade13

    That is perfect! Will you make it?
     
  4. I am interested in creating this plugin and have started a conversation if you still need it.
     
  5. Offline

    Jaitiso

    will do!
     
  6. Offline

    mafumeaade13

    Somebody is already making it, sorry.
     
  7. Offline

    Jaitiso

    k, cool fbm :)

    well... i looked into it a little further and... you would need to edit the craftbukkit code for it to work. maybe also each players minecraft code! or go to... IM SOO SORRY CRAFTBUKKIT MAKERS!!! :'( (((((((((('spout')))))))))).

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

    mafumeaade13

    Ugh, spout
     
  9. Or, use the xp level as a health indicator (or the 1.5 scoreboards) and handle the damage appropriately at damage events.
     
    XlegitXcrazymanX likes this.
  10. Offline

    mafumeaade13

    Can you do it?
     
  11. Maybe, but not now. I am currently working on another plugin request
     
  12. Offline

    mafumeaade13

    Okay, just tell me if you want to, I really want something like this for my server.
     
    Janmm14 likes this.
  13. Offline

    Sinmaru788

    I been looking for something like this too =(
    But I need there hp to go up everytime they level.
    I am using a spout server tho.
     
    Janmm14 likes this.
  14. I'll try and see what I can do :D
     
  15. Offline

    mafumeaade13

    Sure
     
    justcool393 likes this.
  16. Just a quick Question. (being that you can't add more hearts with a plugin) Would you be happy with the health indicator as the xp number or would you like some message sent to the player stating their health
     
  17. Offline

    Laekh


    Or you could just adjust the amount of hearts taken away to be parallel with the adjusted health.
    For example, the normal health is 20, (20 half hearts). and takes 1 hit per half a heart.
    If the max health would be 40, make the half a heart only go down after 2 hits.
     
  18. Yeah, using a damage divisor (damageDealt * divisor) like Cupcakes69 suggested would probably be easier than trying to give those players extra health.

    For example, for players to take 25% less damage, divisor = 0.75.
     
    XlegitXcrazymanX likes this.
  19. From testing, it seems Minecraft does that automatically.
     
  20. Here have fun with this (Little) plugin i just made intell someone can make u somthing better hehe

    there is 5 commands
    <font color="#339966">#maxhealth shows your max health</font>
    /maxhealth
    <font color="#339966">#health shows your Current Health</font>
    /health
    <font color="#339966">#setmaxhealth sets your max health to 100</font>
    /setmaxhealth
    <font color="#339966">#resethealth resets your health back to 20</font>
    /resethealth
    <font color="#339966">#heal umm ya it heals u LOL</font>
    /heal

    <font color="#ff0000">#MAKE SURE TO RESET YOUR HEALH TO 20 WHEN DONE OR IT WILL STAY THIS PLUGIN IS FOR PLAYING AROUND NOT FOR FULL LIVE SERVERS </font>
    <font color="#ff0000">USE AT YOUR OWN RISK!! DO NOT DOWNLOAD ALL 3 THEY WILL CLASH WITH EACHOTHER ONLY USE 1</font>

    <font color="#339966">#Sets your MaxHealth to 100</font>
    MaxHealth.jar
    <Edit by Moderator: Redacted mediafire url>

    <font color="#339966">#Sets your MaxHealth to 500</font>
    MaxHealth500.jar
    <Edit by Moderator: Redacted mediafire url>

    <font color="#339966">#Sets your MaxHealth to 1000</font>
    MaxHealth1000.jar
    <Edit by Moderator: Redacted mediafire url>




    here is the code for any dev who want to mess with it
    Code:java
    1.  
    2. package net.bless.hpplus;
    3.  
    4. import java.util.logging.Logger;
    5.  
    6. import org.bukkit.command.Command;
    7. import org.bukkit.command.CommandSender;
    8. import org.bukkit.entity.Player;
    9. import org.bukkit.plugin.Plugin;
    10. import org.bukkit.plugin.PluginDescriptionFile;
    11. import org.bukkit.plugin.java.JavaPlugin;
    12.  
    13. //Made by Bless_ aka Noraver
    14. public class HpPlus extends JavaPlugin {
    15.  
    16. public static Plugin plugin;
    17. public final Logger logger = Logger.getLogger("Minecraft");
    18. @Override
    19. public void onEnable() {
    20. PluginDescriptionFile p = this.getDescription();
    21. this.logger.info(p.getName() + " V" + p.getVersion() + "Has been enabled!");
    22.  
    23. }
    24. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    25. if ((sender instanceof Player)) {
    26. Player player = (Player)sender;
    27.  
    28. if (cmd.getName().equalsIgnoreCase("maxhealth"))
    29. {
    30. player.sendMessage(player.getMaxHealth() + " health");
    31. return true;
    32. }
    33.  
    34. if (cmd.getName().equalsIgnoreCase("health"))
    35. {
    36. player.sendMessage(player.getHealth() + " health");
    37. return true;
    38. }
    39. if (cmd.getName().equalsIgnoreCase("setmaxhealth"))
    40. {
    41. player.setMaxHealth(100);
    42. return true;
    43. }
    44. if (cmd.getName().equalsIgnoreCase("resethealth"))
    45. {
    46. player.setMaxHealth(20);
    47. return true;
    48. }
    49. if (cmd.getName().equalsIgnoreCase("heal"))
    50. {
    51. player.setHealth(player.getMaxHealth());
    52. player.sendMessage("You have been healed!");
    53. return true;
    54. }
    55. return true;
    56. }
    57.  
    58. return false;
    59. }
    60.  
    61. }
    62. [syntax][/syntax]
     
    Last edited by a moderator: Nov 7, 2016
  21. Offline

    mafumeaade13

    Would it be possible to make the heath changeable? I would want people to donate in health points of 20. With a command that added health, and would eventually reach a cap.
     
  22. Offline

    mafumeaade13

  23. Offline

    Jaitiso

    [quote uid=90742146 name="noraver" post=1619084]Here have fun with this (Little) plugin i just made intell someone can make u somthing better hehe

    there is 5 commands
    <font color="#339966">#maxhealth shows your max health</font>
    /maxhealth
    <font color="#339966">#health shows your Current Health</font>
    /health
    <font color="#339966">#setmaxhealth sets your max health to 100</font>
    /setmaxhealth
    <font color="#339966">#resethealth resets your health back to 20</font>
    /resethealth
    <font color="#339966">#heal umm ya it heals u LOL</font>
    /heal

    <font color="#ff0000">#MAKE SURE TO RESET YOUR HEALH TO 20 WHEN DONE OR IT WILL STAY THIS PLUGIN IS FOR PLAYING AROUND NOT FOR FULL LIVE SERVERS </font>
    <font color="#ff0000">USE AT YOUR OWN RISK!! DO NOT DOWNLOAD ALL 3 THEY WILL CLASH WITH EACHOTHER ONLY USE 1</font>

    <font color="#339966">#Sets your MaxHealth to 100</font>
    MaxHealth.jar
    <Edit by Moderator: Redacted mediafire url>

    <font color="#339966">#Sets your MaxHealth to 500</font>
    MaxHealth500.jar
    <Edit by Moderator: Redacted mediafire url>

    <font color="#339966">#Sets your MaxHealth to 1000</font>
    MaxHealth1000.jar
    <Edit by Moderator: Redacted mediafire url>




    here is the code for any dev who want to mess with it
    Code:java
    1.  
    2. package net.bless.hpplus;
    3.  
    4. import java.util.logging.Logger;
    5.  
    6. import org.bukkit.command.Command;
    7. import org.bukkit.command.CommandSender;
    8. import org.bukkit.entity.Player;
    9. import org.bukkit.plugin.Plugin;
    10. import org.bukkit.plugin.PluginDescriptionFile;
    11. import org.bukkit.plugin.java.JavaPlugin;
    12.  
    13. //Made by Bless_ aka Noraver
    14. public class HpPlus extends JavaPlugin {
    15.  
    16. public static Plugin plugin;
    17. public final Logger logger = Logger.getLogger("Minecraft");
    18. @Override
    19. public void onEnable() {
    20. PluginDescriptionFile p = this.getDescription();
    21. this.logger.info(p.getName() + " V" + p.getVersion() + "Has been enabled!");
    22.  
    23. }
    24. public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args){
    25. if ((sender instanceof Player)) {
    26. Player player = (Player)sender;
    27.  
    28. if (cmd.getName().equalsIgnoreCase("maxhealth"))
    29. {
    30. player.sendMessage(player.getMaxHealth() + " health");
    31. return true;
    32. }
    33.  
    34. if (cmd.getName().equalsIgnoreCase("health"))
    35. {
    36. player.sendMessage(player.getHealth() + " health");
    37. return true;
    38. }
    39. if (cmd.getName().equalsIgnoreCase("setmaxhealth"))
    40. {
    41. player.setMaxHealth(100);
    42. return true;
    43. }
    44. if (cmd.getName().equalsIgnoreCase("resethealth"))
    45. {
    46. player.setMaxHealth(20);
    47. return true;
    48. }
    49. if (cmd.getName().equalsIgnoreCase("heal"))
    50. {
    51. player.setHealth(player.getMaxHealth());
    52. player.sendMessage("You have been healed!");
    53. return true;
    54. }
    55. return true;
    56. }
    57.  
    58. return false;
    59. }
    60.  
    61. }
    62.  
    [/quote]


    Ty can actually see if it works :) might develop it tonight idk
    Please tell my the amount of health you are willing to give people EG:
    mod: 30
    admin: 50
    headadmin: 75
    owner: 100
    etc.

    fk... to late :p my internet has been down :(

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

    mkiplm

    deff need a level system with this, so you can set a default hp to start and every time you level you can gain more hp. any way to do this?
     
    Janmm14 likes this.
  25. Offline

    Bady

    Hy!
    I have a little problem:
    With this plugin, if the player die, the health level set back to normal. I would like to keep players health level.
    Is it possible to change it somehow?

    Anyway, this plugin is the best helath plugin what I ever seen!
     
  26. noraver
    Wow.. ever thought about using the config.yml instead of making a different version just to change the number? Lol. A kinda poor developed plugin.
     
  27. I think and hope in about 11 houres I'll have done these plugins. The thing is that I'll go to bed now.

    mkiplm Bady Jaitiso
    Command to see your maximum health: /maxhealth, /maxhearts, /mhealth, /mhearts, /myhealth
    showInformation in config.yml defines wheter additional information about the health bar should be shown when using command.

    Getting health because of saying it in config.yml: http://gronkhdeinofdev.111mb.de/rankHealth.jar
    Getting health form experience level: http://gronkhdeinofdev.111mb.de/expHealth.jar

    If you have questions, feel free to ask!

    Thats how its done actually if you increase the maxhealth from players with player.setMaxHealth(Amount)

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

    Bady

    you tagged me in this post, but you not write me any helpful answer...
     
  29. Offline

    victordestroyer

    sorry to say this but there is already a plugin like this its called Permissions Health. it some what works for me.
     

Share This Page