Solved getHealth() is ambiguous for the type Player

Discussion in 'Plugin Development' started by HighOnSwiftness, Jan 4, 2014.

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

    HighOnSwiftness

    When ever I try to do this:
    Code:java
    1. p.setHealth(p.getHealth() - 10.0);

    It says:
    Code:java
    1. The method getHealth() is ambiguous for the type Player

    May I have some help?
     
  2. Offline

    xTrollxDudex

  3. You are using CraftBukkit not Bukkit. Switch to bukkit for coding.
     
  4. Offline

    Chibbey

    Look at the top of the forums. Their is a sticky thread about it :)
     
  5. Offline

    HighOnSwiftness

  6. Offline

    AstramG

    If you choose not to switch to bukkit instead of craft bukkit for coding you can cast an entity to a Damageable and do it that way.
     
Thread Status:
Not open for further replies.

Share This Page