Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: CraftBukkit 1.5.1-R0.1
    • Component/s: Events
    • Security Level: Public (Viewable by everyone)
    • Labels:
      None

      Description

      Bukkit needs an event for when a player finishes eating. I'm sure this would be as useful to others as it would be to me as I have seen several mentions on the forum that an eat event is needed that fires once the food has been eaten. I'd attempt to find a solution myself and submit a pull request if found but I cannot use maven.

        Issue Links

          Activity

          Hide
          Dennison Richter added a comment -

          Bump, we have a perfectly workable solution already coded, but nobody has even looked at the pull request despite the fact that it was submitted over 5 months ago. Why the hell not?

          Show
          Dennison Richter added a comment - Bump, we have a perfectly workable solution already coded, but nobody has even looked at the pull request despite the fact that it was submitted over 5 months ago. Why the hell not?
          Hide
          Joris Kerkhoff added a comment - - edited

          I totally agree with Dennison and Ryan. Please look at the pull-request, although it may not be valid anymore.
          Just found this pr too: https://github.com/Bukkit/CraftBukkit/pull/1039

          Show
          Joris Kerkhoff added a comment - - edited I totally agree with Dennison and Ryan. Please look at the pull-request, although it may not be valid anymore. Just found this pr too: https://github.com/Bukkit/CraftBukkit/pull/1039
          Hide
          EdGruberman added a comment -

          Can you clarify some specific plugin use cases for this request? We all seem to think this is a good idea, but clarifying the use case might help finalize decision making on if this is the right approach.

          Show
          EdGruberman added a comment - Can you clarify some specific plugin use cases for this request? We all seem to think this is a good idea, but clarifying the use case might help finalize decision making on if this is the right approach.
          Hide
          Ryan Michela added a comment -

          For my Zombie Plague plugin, I wanted eating a cookie to cure disease. You can eat a cookie even if not hungry. PlayerInteract won't work because it will fire even if the player stops eating before cconsumption registers. HungerChanged won't work because it doesn't fire if the player is at full hunger before eating. A PlayerConsume event fills the gap, accurately reporting that something was successfully consumed, even if said consumption has no effect.

          Show
          Ryan Michela added a comment - For my Zombie Plague plugin, I wanted eating a cookie to cure disease. You can eat a cookie even if not hungry. PlayerInteract won't work because it will fire even if the player stops eating before cconsumption registers. HungerChanged won't work because it doesn't fire if the player is at full hunger before eating. A PlayerConsume event fills the gap, accurately reporting that something was successfully consumed, even if said consumption has no effect.
          Hide
          Jesse Sieunarine added a comment -

          As Ryan has said what we need is an event that fires when the food is actually eaten/consumed this applies to not only food but potions as well. None of the other events work as they fire when food is right clicked but the player may never actual consume the food or when the food level has changed but it is not known what food item it is and there isn't really an event for potions. This event would fire as the player consumes the food/potion, what has happened (maybe a new effect type, e.g. Nutrition, cure, fire resistance, speed, etc.), how much nutrition and the other food value (don't remember off the top off my head), the actual id of the item consumed, the player and anything else that may be useful.

          Show
          Jesse Sieunarine added a comment - As Ryan has said what we need is an event that fires when the food is actually eaten/consumed this applies to not only food but potions as well. None of the other events work as they fire when food is right clicked but the player may never actual consume the food or when the food level has changed but it is not known what food item it is and there isn't really an event for potions. This event would fire as the player consumes the food/potion, what has happened (maybe a new effect type, e.g. Nutrition, cure, fire resistance, speed, etc.), how much nutrition and the other food value (don't remember off the top off my head), the actual id of the item consumed, the player and anything else that may be useful.

            People

            • Votes:
              26 Vote for this issue
              Watchers:
              15 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: