Solved Help with getHealt

Discussion in 'Plugin Development' started by SrNicks_, May 26, 2015.

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

    SrNicks_

    How much is half hearted ?

    Example:
    Code:
    if(p.getHealt.equals( //half a heart)){
    }
     
  2. Offline

    I Al Istannen

    @SrNicks_ It should be 1. A player has 20 health, equaling to 10 Hearts. So half a heart should be 1. And i would suggest comparing number with "==" instead of equals, although both should work.
     
  3. Offline

    teej107

    Primitives should be compared with == and not with #equals()
     
    mine-care likes this.
  4. Offline

    I Al Istannen

    @teej107 I don't see what's wrong with my answer, isn't a double a primitive? Or did you just wanted to make it more specific?
     
  5. Offline

    SrNicks_

Thread Status:
Not open for further replies.

Share This Page