From 52355b275791c3707738ab73fbd65e350d3cee3d Mon Sep 17 00:00:00 2001 From: nossr50 Date: Tue, 15 Jan 2019 05:39:25 -0800 Subject: [PATCH] Fixing error in Farmer's Diet --- src/main/java/com/gmail/nossr50/listeners/EntityListener.java | 4 ++-- .../com/gmail/nossr50/skills/herbalism/HerbalismManager.java | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java index 40a14611b..2364d551b 100644 --- a/src/main/java/com/gmail/nossr50/listeners/EntityListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/EntityListener.java @@ -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; diff --git a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java index 25996eca0..867696de0 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -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); }