Bukkit/Bukkit — pull request #831 by yayestechlab (2013-03-30 01:03:10+00:00)
Title: [B] Adds the ability to get the amount of hunger and saturation a Material restores. Adds BUKKIT-3909

Justification for this PR:

We have isEdible()

However it would be useful to be able to pull how much hunger or saturation an item is worth without using NMS or hard coding the values.

Having this function would mean that some plugins might not need to be updated every time a new food item is added.

PR Breakdown:

This PR adds the ability to get the hunger and saturation a Material will add, using Material.getHunger() and Material.getSaturation(), respectively.

Testing Materials:

JAR: https://dl.dropbox.com/u/4258783/HungerCallsTest.jar | Source: https://github.com/yayestechlab/HungerCallsTest

JIRA Ticket:

BUKKIT-3909 - https://bukkit.atlassian.net/browse/BUKKIT-3909