Solved 1.6.1 getHealth() ambiguous

Discussion in 'Plugin Development' started by andf54, Jul 4, 2013.

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

    andf54

    I need to update my plugin, but I have no idea how to fix the issue.

    double hp = wrapped.getHealth(); gives me: The method getHealth() is ambiguous.

    Im guessing it has something to do with this:
    Code:java
    1. Github:
    2. - int getHealth();
    3. + double getHealth();
    4. +
    5. + /**
    6. + * This method exists for legacy reasons to provide backwards
    7. + * compatibility. It will not exist at runtime and should not be used
    8. + * under any circumstances.
    9. + */
    10. + @Deprecated
    11. + int _INVALID_getHealth();


    Could someone explain what bukkit team is up to?
     
  2. Offline

    messageofdeath

    they changed it to doubles. Are you asking to get it or set it?
     
  3. Offline

    andf54

    setHealth isn't a problem.

    I need .getHealth(), which gives me an error just for calling it.

    "The method getHealth() is ambiguous for the type LivingEntity"
     
  4. Offline

    i3ick

    This question was just answered in my thread, go have a look
     
    andf54 likes this.
  5. Offline

    WhatAaCow

    Where can i get bukit 1.6.1?
     
  6. Offline

    LucasEmanuel

  7. Offline

    andf54

    Ok, found the solution:
    R-click your project-> Properties-> Java Build Path-> Order and Export
    Your bukkit.jar must be above your craftbukkit.jar.

    http://dl.bukkit.org/downloads/bukkit/

    Not exactly. It wasn't very clear and it said to have bukkit.jar below craftbukkit.jar. It did help, however. Thanks.
     
    Goty_Metal likes this.
  8. Offline

    i3ick

    Oh yeah, I forgot to mention that. Glad it helped though
     
  9. Offline

    Goty_Metal

    Thanks pal that fixed my problem :)
     
Thread Status:
Not open for further replies.

Share This Page