Solved Player's Health

Discussion in 'Plugin Development' started by bubblefat_, Jun 15, 2015.

Thread Status:
Not open for further replies.
  1. Offline


    Whenever I use player.getHealthScale() it always says 20.0 no matter how much health. Anyone know why?
  2. Offline


    getHealthScale will return the how many hearts that player can see on their screen. Which by default would be 20 half hearts. Try consuming an enchanted golden apple and see if this changes due to the extra hearts.
  3. Offline



            Damageable p = (Damageable) killer;
            double rounded = Math.round(p.getHealth() * 10) / 10;
  4. Offline


    Uh... If you want the health just do player#getHealth() why would you round and then multiply then divide?
Thread Status:
Not open for further replies.

Share This Page