player.getHealth() wont work for 1.6?

Discussion in 'Plugin Development' started by bennie3211, Jul 18, 2013.

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

    bennie3211

    Hi guys,

    I got a little problem with my code, I am trying to make a plugin that modifies the player health when they do an action, but for some reasons, it can not get the player health.

    When i try to get it with: int health = event.getPlayer().getHealth(); it says this: The method getHealth() is ambiguous for the type Player. Does anyone else have the same problem?
     
  2. Offline

    blablubbabc

  3. Offline

    bennie3211

    Still if i use doubles, it gives the same problem for me :L
     
  4. Offline

    savagesun

    You need to compile with Bukkit. If you absolutely need to use craftbukkit then import both and make sure Bukkit is above craftbukkit in your import order. Worked for me anyways.

    Edit: if you had bothered to read more than the first post you'd know this. Just felt like a little shaming was necessary here :p
     
Thread Status:
Not open for further replies.

Share This Page