Ambiguous .getHealth()

Discussion in 'Plugin Development' started by Flyverse, Sep 23, 2013.

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

    Flyverse

    (Before someone says "There are 100 duplicates of this": I am very aware of it, that many threads are asking this same question. I used the search and read everyone of those threads i found - But no one solved my problem.)

    Anyone knows how to solve the error "The method getHealth() is ambiguous for the type Player"? I'm pretty sure I use a bukkit, and not craftbukkit build; So I don't understand why this isn't working. (Neither do I understand what is wrong with a craftbukkit build - And yes, I read EvilSeph' Thread.)

    Kindly regards

    Solved it: I casted my entity to damageable instead of Player. Is it the wrong way to do it or not?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  2. Offline

    tommycake50

    If it works it works.
    There isn't necessarily a "right" way.
     
    Flyverse likes this.
  3. Offline

    DxDy

    Compile against the API instead of Craftbukkit and the method won't be ambiguous ;)
     
  4. Offline

    evilmidget38 Retired Staff

  5. Offline

    Flyverse

    DxDy
    As I said: I'm not using Craftbukkit.
    evilmidget38
    As I said: I read it. But I didn't understood it, if the solution was in there.
     
  6. Offline

    evilmidget38 Retired Staff

    Flyverse What are you using to compile your plugins? Are you using maven, or just exporting it with your IDE?
     
Thread Status:
Not open for further replies.

Share This Page