a Fast-Soup Problem

Discussion in 'Plugin Development' started by SaharEdits, Jul 12, 2013.

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

    SaharEdits

    Hello guys,
    I made a Fast soup code, and there is Problem!
    so i open today My Eclipse, and i see there is Error! 1 day ago its is'nt send this Error!
    My Code:
    Code:java
    1. @EventHandler
    2. public void FastSoup(PlayerInteractEvent event)
    3. {
    4. Player player = event.getPlayer();
    5. Action action = event.getAction();
    6. //Soup
    7. if (player.getHealth() != 20)
    8. {
    9. if ((action == Action.RIGHT_CLICK_AIR) || (action == Action.RIGHT_CLICK_BLOCK))
    10. {
    11. if (player.getItemInHand().getType() == Material.MUSHROOM_SOUP)
    12. {
    13. player.setHealth(player.getHealth() + 7 > player.getMaxHealth() ? player.getMaxHealth() : player.getHealth() + 7);
    14. player.getItemInHand().setType(Material.BOWL);
    15. player.getWorld().playSound(player.getLocation(), Sound.BURP, 3, 1);
    16. player.setFoodLevel(17);
    17. }
    18. }
    19. }
    20. }

    Theres Is a Picture with the Errors:
    [​IMG]
    Tnx for the helpers ;(
     
  2. Offline

    dillyg10

    What is the error....
     
  3. Offline

    SaharEdits

    The method getHealth()/getMaxHealth() is ambiguous for the type Player
     
  4. Offline

    Compressions

    SaharEdits Build against Bukkit, not CraftBukkit.
     
  5. Offline

    SaharEdits

    Whats you mean?
     
  6. Offline

    sayaad

    I suggest you read this post.
     
  7. Offline

    adde

    Download bukkit (NOT Craftbukkit) and and then use that one as top library and then below use Craftbukkit.
     
Thread Status:
Not open for further replies.

Share This Page