From 8aff873a5b38f4d906bc77c9285fc7d2583d72de Mon Sep 17 00:00:00 2001 From: kikelkik Date: Mon, 5 Oct 2020 22:18:27 +0200 Subject: [PATCH] fix for #940 (stripping logs are respected as block place actions) --- .../com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 0c9f5ddc..522291ab 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -423,6 +423,10 @@ public class JobsPaymentListener implements Listener { @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onBlockPlace(BlockPlaceEvent event) { + // A tool should not trigger a BlockPlaceEvent (fixes stripping logs bug #940) + if (CMIMaterial.get(event.getItemInHand().getType()).isTool()) + return; + Block block = event.getBlock(); //disabling plugin in world