Fixing error in Farmer's Diet

This commit is contained in:
nossr50 2019-01-15 05:39:25 -08:00
parent 13a3e9a790
commit 52355b2757
2 changed files with 3 additions and 4 deletions

View File

@ -577,7 +577,7 @@ public class EntityListener implements Listener {
* 1000
*/
if (Permissions.isSubSkillEnabled(player, SubSkillType.HERBALISM_FARMERS_DIET)) {
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(Herbalism.farmersDietRankLevel1, newFoodLevel));
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(newFoodLevel));
}
return;
@ -589,7 +589,7 @@ public class EntityListener implements Listener {
*/
case POTATO: /* RESTORES 1/2 HUNGER - RESTORES 2 HUNGER @ 1000 */
if (Permissions.isSubSkillEnabled(player, SubSkillType.HERBALISM_FARMERS_DIET)) {
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(Herbalism.farmersDietRankLevel2, newFoodLevel));
event.setFoodLevel(UserManager.getPlayer(player).getHerbalismManager().farmersDiet(newFoodLevel));
}
return;

View File

@ -71,11 +71,10 @@ public class HerbalismManager extends SkillManager {
/**
* Handle the Farmer's Diet ability
*
* @param rankChange The # of levels to change rank for the food
* @param eventFoodLevel The initial change in hunger from the event
* @return the modified change in hunger for the event
*/
public int farmersDiet(int rankChange, int eventFoodLevel) {
public int farmersDiet(int eventFoodLevel) {
return SkillUtils.handleFoodSkills(getPlayer(), eventFoodLevel, SubSkillType.HERBALISM_FARMERS_DIET);
}