Solved HealthBoost potion effect

Discussion in 'Spigot Plugin Development' started by PurrfectMistake_, Jun 21, 2016.

  1. To save me from testing, i have a question. If players have a Healthboost potion effect, and I create a /heal command that is just as simple as this;

    Code (Text):
                            player.sendMessage(ChatColor.GREEN + "Venom" + ChatColor.DARK_GRAY + "// " + ChatColor.YELLOW + " You have been healed!");
                          player.setHealth(player.getMaxHealth());
                          return true;
    Would that work? Considering the players actual max health isn't set, as if it was: player.setMaxHealth()

    ??
     
  2. important is the present, the present or current max health of the player where the method player.getMaxHealth() // returns

    so doing that method will be good with your case.
     
  3. Thanks fam. ily.

    I'm positive you can relate with me, that the process of testing is annoying.
    • Export
    • Upload by ftp / multicraft
    • restart
    • test
    • fix errors
    • repeat
     
  4. I feel you :p recommending you to have your own local server at your desktop or mac, after having the final fixed released version then upload to the ftp / multicraft.
     
  5. I have one. Just cba starting it up. ahhaha

    Im very lazy, if you haven't noticed. x"D Ironically, I have a very active job at a Koala reserve in Aus xD
     
  6. that's quite fascinating good luck.