Changing FoodLevel and Hunger

Discussion in 'Plugin Development' started by jacklin213, Jun 30, 2013.

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

    jacklin213

    Hi guys im trying to make a plugin.

    The plugin is ment to change how much food heals
    I am using PlayerItemConsumeEvent atm.
    Everything is working fine accept that when you eat food , the default amount of hunger will still heal before the amount i have chosen.

    How do i disable the normal hunger heal amount or is there another way to change how much food heals
     
  2. Offline

    CubieX

    Normally you do your own actions and then in the end you cancel the event,
    to prevent getting the original games event treatment.
     
  3. Offline

    jacklin213

    Ah , so I put the event.setCanceled in the rong place , I'll try that thanks
     
  4. Offline

    CubieX

    Hm. If you already used "event.setCanceled(true); then perharps the food level "healing" is handled in another event.
    Have a look at the FoodLevelChangeEvent.
     
Thread Status:
Not open for further replies.

Share This Page