From 2a26b016d9ee00fb6d63e11c2cb13fb3bf17c299 Mon Sep 17 00:00:00 2001 From: t00thpick1 Date: Mon, 24 Dec 2018 19:33:26 -0500 Subject: [PATCH] Only stop monitoring LOG To LOG transitions, there are a ton of non-air block placements we want to monitor --- .../java/com/gmail/nossr50/listeners/BlockListener.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java index 067b92bb8..7fbb4140b 100644 --- a/src/main/java/com/gmail/nossr50/listeners/BlockListener.java +++ b/src/main/java/com/gmail/nossr50/listeners/BlockListener.java @@ -21,10 +21,7 @@ import com.gmail.nossr50.skills.woodcutting.WoodcuttingManager; import com.gmail.nossr50.util.*; import com.gmail.nossr50.util.player.UserManager; import com.gmail.nossr50.util.skills.SkillUtils; -import org.bukkit.GameMode; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.Sound; +import org.bukkit.*; import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockState; @@ -132,8 +129,8 @@ public class BlockListener implements Listener { /* Check if the blocks placed should be monitored so they do not give out XP in the future */ if (BlockUtils.shouldBeWatched(blockState) && blockState.getType() != Material.CHORUS_FLOWER) { - //Monitor only blocks that replaced air - if(event.getBlockReplacedState().getType() == Material.AIR) + // Don't count de-barking wood + if (!Tag.LOGS.isTagged(event.getBlockReplacedState().getType()) || !Tag.LOGS.isTagged(event.getBlockPlaced().getType())) mcMMO.getPlaceStore().setTrue(blockState); }