From bbbd12d46120f20a072c2f8f367af1cd5c2505f8 Mon Sep 17 00:00:00 2001
From: GJ <gjmcferrin@gmail.com>
Date: Tue, 15 Jan 2013 13:13:20 -0500
Subject: [PATCH] Fix issue where Tree Feller affected player-placed blocks.
 Fixes #507

---
 Changelog.txt                                        |  1 +
 .../gmail/nossr50/skills/gathering/WoodCutting.java  | 12 +++++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/Changelog.txt b/Changelog.txt
index 12520f490..af13c1bf5 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -21,6 +21,7 @@ Version 1.3.13-dev
  + Added wooden button to the list of items that shouldn't trigger abilities
  + Added a new feature to fishing. Players will have +10% chance of finding enchanted items when fishing while it's raining
  + Added displaying bonus perks on skill commands
+ = Fixed issue with Tree Feller dropping player-placed blocks
  = Fixed issue with missing default cases from several switch/case statements
  = Fixed issue with Mining using actual skill level rather than max skill level
  = Fixed some issues with static access
diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java
index 7d3c6a261..c1f2d6d2c 100644
--- a/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java
+++ b/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java
@@ -240,11 +240,13 @@ public class WoodCutting {
             return;
         }
 
-        if (type.equals(Material.LOG) || type.equals(Material.LEAVES)) {
-            toBeFelled.add(currentBlock);
-        }
-        else if (Config.getInstance().getBlockModsEnabled() && (ModChecks.isCustomLogBlock(currentBlock) || ModChecks.isCustomLeafBlock(currentBlock))) {
-            toBeFelled.add(currentBlock);
+        if (!mcMMO.placeStore.isTrue(currentBlock)) {
+            if ((type.equals(Material.LOG) || type.equals(Material.LEAVES))) {
+                toBeFelled.add(currentBlock);
+            }
+            else if (Config.getInstance().getBlockModsEnabled() && (ModChecks.isCustomLogBlock(currentBlock) || ModChecks.isCustomLeafBlock(currentBlock))) {
+                toBeFelled.add(currentBlock);
+            }
         }
 
         Block xPositive = currentBlock.getRelative(1, 0, 0);