Get maximum health for a horse

Discussion in 'Plugin Development' started by Nogtail, Aug 19, 2013.

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

    Nogtail

    I assumed the method would be horse.getMaxHealth() but I'm getting the error "the method getMaxHealth() is ambiguous for the type Horse" and I'm not entirely sure what that means and if its a Bukkit issue or one I have caused. If it is a Bukkit issue is there another way to get the maximum health of a horse?
    Thanks :)
     
  2. Offline

    Nogtail

  3. Whenever Eclipse is showing errors and I don't think it should be, I just press save-all. You already compiled, though, so it should've done this automatically. If it has a red line under it, then it's an error and I don't think there's really anything you can do about it. However, if it just has a yellow line under it, that means it's a warning. You can hover over the warning with your mouse and press the option with the words "suppress warning" in it. Would you mind showing the error/warning and what it says the problem is? This will help.
     
  4. Offline

    Nogtail

    The error:
    [​IMG]
    (the getJump method had not been finished, I'm just returning something so I could test the compile)
    The Export:
    [​IMG]
    (Warnings are in the other classes where I have not used some of the variables)
     
  5. Offline

    Nogtail

    I seem to be getting a runtime error now with the ambiguous thing :(
     
  6. Make sure you're building with the Bukkit.jar, not CraftBukkit.jar. If you need CraftBukkit.jar (for something like NMS), be sure to load Bukkit.jar first.
     
    Nogtail likes this.
  7. Offline

    Nogtail

    Thanks a heap for the help, it works fine now!:)
     
Thread Status:
Not open for further replies.

Share This Page