From 56d27c3d78d4e010a0d6a74a42bbcf7e944a1b05 Mon Sep 17 00:00:00 2001 From: GJ Date: Wed, 23 Jan 2013 13:06:13 -0500 Subject: [PATCH] Fixed issues with Hylian Luck & the placed-block flag. --- Changelog.txt | 2 ++ src/main/java/com/gmail/nossr50/listeners/BlockListener.java | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Changelog.txt b/Changelog.txt index eb3042c4d..9dd189b34 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -15,6 +15,8 @@ Version 1.4.00-dev = Fixed bug where Impact improperly determined the defender's armor = Fixed ArrayIndexOutOfBoundsException resulting from being unranked in a skill when using FlatFile = 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. ! 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 ! Changed Fisherman's Diet and Farmer's Diet to use two seperate config values diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 630907886..1a0b67db2 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -214,13 +214,14 @@ public class BlockListener implements Listener { @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockBreakHigher(BlockBreakEvent event) { Player player = event.getPlayer(); + Block block = event.getBlock(); if (Misc.isNPC(player)) { return; } - if (Permissions.hylianLuck(player) && ItemChecks.isSword(player.getItemInHand())) { - Herbalism.hylianLuck(event.getBlock(), player, event); + if (Permissions.hylianLuck(player) && ItemChecks.isSword(player.getItemInHand()) && !mcMMO.placeStore.isTrue(block)) { + Herbalism.hylianLuck(block, player, event); } }