diff --git a/Changelog.txt b/Changelog.txt index 4a5ccc3fb..b24c6cab4 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -20,6 +20,7 @@ Version 1.4.00-dev = Fixed Woodcutting accidentally using Mining double drop values. = Fixed Hylian Luck not removing the block-placed flag from flowers. = Fixed Hylian Luck not checking the block-placed flag on flowers. + = Fixed Leaf Blower not respected the unlock level set in advanced.yml ! Changed how Berserk handles not picking up items to avoid listening to PlayerPickupItemEvent ! Moved Hylian Luck into a separate listener since it actually cancels the event and shouldn't just be on MONITOR. ! Changed how Tree Feller is handled, it should now put less stress on the CPU diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 70d25795b..d342653e2 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -20,6 +20,7 @@ import org.bukkit.metadata.FixedMetadataValue; import org.getspout.spoutapi.sound.SoundEffect; import com.gmail.nossr50.mcMMO; +import com.gmail.nossr50.config.AdvancedConfig; import com.gmail.nossr50.config.Config; import com.gmail.nossr50.datatypes.PlayerProfile; import com.gmail.nossr50.events.fake.FakeBlockBreakEvent; @@ -249,12 +250,10 @@ public class BlockListener implements Listener { */ @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockDamage(BlockDamageEvent event) { - if (event instanceof FakeBlockDamageEvent) { return; } - final int LEAF_BLOWER_LEVEL = 100; Player player = event.getPlayer(); @@ -342,7 +341,7 @@ public class BlockListener implements Listener { miningManager.superBreakerBlockCheck(block); } } - else if (profile.getSkillLevel(SkillType.WOODCUTTING) >= LEAF_BLOWER_LEVEL && (material.equals(Material.LEAVES) || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLeafBlock(block)))) { + else if (profile.getSkillLevel(SkillType.WOODCUTTING) >= AdvancedConfig.getInstance().getLeafBlowUnlockLevel() && (material.equals(Material.LEAVES) || (configInstance.getBlockModsEnabled() && ModChecks.isCustomLeafBlock(block)))) { if (Skills.triggerCheck(player, block, AbilityType.LEAF_BLOWER)) { if (configInstance.getWoodcuttingRequiresTool()) { if (ItemChecks.isAxe(inHand)) {