mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Fixing error in Farmer's Diet
This commit is contained in:
parent
13a3e9a790
commit
52355b2757
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user