Hello, i don't know what im doing wrong but I get a red line under .getHealth() says "The method getHealth() is ambiguous for the type Player" anyone know how to fix this it would be great! heres my code so far: Code:java @EventHandler public void onPlayerDeath(PlayerDeathEvent e) { Player player = e.getEntity(); Player attacker = e.getEntity().getKiller(); e.getDrops().clear(); e.setDroppedExp(3); if(attacker != null) { getChat().sendMessage(player, "You have been killed by, §b" + attacker.getDisplayName() + "§r."); getChat().sendMessage(attacker, "You have killed, §b" + player.getDisplayName() + "§r."); EconomyResponse p = Kits.econ.depositPlayer(attacker.getName(), 10); EconomyResponse r = Kits.econ.withdrawPlayer(player.getName(), 5); if(p.transactionSuccess()) { getChat().sendMessage(attacker, "Amount received: $10"); } else { getChat().sendMessage(attacker, "Amount received: $0"); } if(r.transactionSuccess()) { getChat().sendMessage(player, "Amount taken: $5"); } else { getChat().sendMessage(player, "Amount taken: $0"); } if(attacker.getHealth() != 20.0) { attacker.setHealth(20.0); } } }
getHealth() is sort of broken with Bukkit. They are trying to fix it. http://forums.bukkit.org/threads/oops-i-didnt-break-your-plugins-ambiguous-gethealth.156975/