Discussion in 'Plugin Development' started by mickedplay, Jun 7, 2014.

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


    Hello bukkit coders,

    I want to save players health in a HashMap before clicking on a sign.

    HashMap<String, Double> playerHealth = new HashMap<String, Double>();
    playerHealth.put(p.getName(), p.getHealth());

    The method getHealth() is ambiguous for the Type Player.

    I used google, but I didn't find a solution.

    Any help for saving playersHealth in a HashMap?
  2. Offline


    Use bukkit instead of craftbukkit for your dependency.
  3. Offline


  4. Offline


    You're using craftbukkit in your dependency. Download bukkit:
    Then go to your plugin project on Eclipse/Your IDE, right click, choose Properties, then go to Java Build Path, delete the craftbukkit one, add the bukkit one, and then add craftbukkit again
  5. Offline


    LCastr0 I'll try, but where's the difference between Bukkit & Craftbukkit?
  6. Offline


    A good post by desht that explains it quite well

    mickedplay likes this.
  7. mickedplay Sticky thread about this problem:

    One or two other threads about this problem:

    And those were just the ones I could be bothered to find. Net result, I don't think you really did search, or did so for less than 2 minutes, because I'm not some magical search wizard to be honest.
    mickedplay, teej107 and hankered like this.
Thread Status:
Not open for further replies.

Share This Page