diff --git a/Changelog.txt b/Changelog.txt index 46da30b3d..db865aeb2 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -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 diff --git a/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java b/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java index 9319b67b1..663c2e9a4 100644 --- a/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/mcBlockListener.java @@ -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); } diff --git a/src/main/java/com/gmail/nossr50/skills/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/Herbalism.java index 09d9d9401..092a94757 100644 --- a/src/main/java/com/gmail/nossr50/skills/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/Herbalism.java @@ -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,10 +249,10 @@ public class Herbalism { m.mcDropItem(loc, is); } } - - PP.addXP(SkillType.HERBALISM, xp); - Skills.XpCheckSkill(SkillType.HERBALISM, player); } + + PP.addXP(SkillType.HERBALISM, xp); + Skills.XpCheckSkill(SkillType.HERBALISM, player); } /**