I DONT GET IT

Discussion in 'Plugin Development' started by AKS JEFFREY, Jun 7, 2014.

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

    AKS JEFFREY

    So I'm trying to do something like if i eat a rotten flesh i get hunger but if i hit another play they get poison.
     
  2. Offline

    klosjaarrr

    And what is exactly the problem? Where do you get stuck?
     
  3. Offline

    mine-care

    Can you be more specific plz?
     
  4. Offline

    Gamecube762

    PlayerConsumeEvent?
    EntityDamageEvent?
     
  5. Offline

    AKS JEFFREY

    klosjaarrr mine-care Gamecube762 so umm i don't know if it will work but maybe On player damage if the attacker has hunger the (person getting hit) will have poison. Some thing wat zombies do to people.
     
  6. Offline

    jthort

  7. Offline

    AoH_Ruthless

    AKS JEFFREY
    You want an onItemConsumeEvent (I believe that is what is called) regarding eating rotten flesh. Then you may add hunger to their food level (Player#getFoodLevel()).

    As for your other problem, listen for an
    EntityDamageByEntityEvent.
     
Thread Status:
Not open for further replies.

Share This Page