Fixed bugs with Herbalism and permissions

This commit is contained in:
nossr50 2012-04-10 08:48:59 -07:00
parent 74188415dd
commit a90e4e9c8d
3 changed files with 6 additions and 6 deletions

View File

@ -10,6 +10,7 @@ Key:
Version 1.3.06-dev
+ Added permissions check to skill functions
+ Added API functions for obtaining offline profiles & profiles via player names
= Fixed bug where Herbalism required double drops permission to give XP
= Fixed bug where {0} would be displayed in front of your power level in mcstats
= Fixed mmoupdate not being useable from console
= Fixed bug with repairing wooden tools

View File

@ -155,7 +155,7 @@ public class mcBlockListener implements Listener {
Herbalism.herbalismProcCheck(block, player, event, plugin);
}
if (mcPermissions.getInstance().herbalismDoubleDrops(player) && Herbalism.canBeGreenTerra(mat)) {
if (mcPermissions.getInstance().herbalism(player) && Herbalism.canBeGreenTerra(mat)) {
Herbalism.herbalismProcCheck(block, player, event, plugin);
}

View File

@ -227,8 +227,7 @@ public class Herbalism {
if (mat == null) {
return;
}
else {
} else if (mcPermissions.getInstance().herbalismDoubleDrops(player)) {
ItemStack is = new ItemStack(mat);
if (herbLevel > MAX_BONUS_LEVEL || random.nextInt(1000) <= herbLevel) {
@ -250,11 +249,11 @@ public class Herbalism {
m.mcDropItem(loc, is);
}
}
}
PP.addXP(SkillType.HERBALISM, xp);
Skills.XpCheckSkill(SkillType.HERBALISM, player);
}
}
/**
* Apply the Green Thumb ability to crops.