diff --git a/Changelog.txt b/Changelog.txt index 3d433517b..2a1353c21 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -5,9 +5,11 @@ Version 2.1.174 Updated fr locale (thanks Elikill58) (API) Added SubSkillBlockEvent for some SubSkill events that have a block (eg: Green Thumb Block events) (API) Green Thumb (Block) now fires a SubSkillBlockEvent which is cancellable + (API) Green Thumb (Plant) now fires SubSkillBlockEvent which is cancellable (API) Shroom Thumb now fires a SubSkillBlockEvent which is cancellable NOTE: A lot of sub-skills without random chance elements are missing events, this will be cleaned up in the near future. If you need something specific added sooner than that, post a GitHub issue for it and I'll patch it in. + I'm likely to separate Green Thumb into two distinct skills in an upcoming patch Version 2.1.173 The experience orbs dropped by Knock on Wood rank 2 during Tree Feller are now much less frequent but provide more XP 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 d1d920359..4a8104dd9 100644 --- a/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java +++ b/src/main/java/com/gmail/nossr50/skills/herbalism/HerbalismManager.java @@ -754,11 +754,16 @@ public class HerbalismManager extends SkillManager { return false; } - playerInventory.removeItem(seedStack); - player.updateInventory(); // Needed until replacement available - //Play sound - SoundManager.sendSound(player, player.getLocation(), SoundType.ITEM_CONSUMED); - return true; + if(EventUtils.callSubSkillBlockEvent(player, SubSkillType.HERBALISM_GREEN_THUMB, blockState.getBlock()).isCancelled()) { + return false; + } else { + playerInventory.removeItem(seedStack); + player.updateInventory(); // Needed until replacement available + //Play sound + SoundManager.sendSound(player, player.getLocation(), SoundType.ITEM_CONSUMED); + return true; + } + // new HerbalismBlockUpdaterTask(blockState).runTaskLater(mcMMO.p, 0); }