From afef2dc92792f0edc5236ce806625d4b19f2977b Mon Sep 17 00:00:00 2001 From: montlikadani Date: Tue, 21 Apr 2020 11:37:59 +0200 Subject: [PATCH] Prevent players from being getting more money from beehives while sneaking --- .../java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index 255a75cc..3219f1ad 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -1631,7 +1631,7 @@ public class JobsPaymentListener implements Listener { } if (Version.isCurrentEqualOrHigher(Version.v1_15_R1) && !event.useInteractedBlock().equals(org.bukkit.event.Event.Result.DENY) - && event.getAction() == Action.RIGHT_CLICK_BLOCK) { + && event.getAction() == Action.RIGHT_CLICK_BLOCK && !p.isSneaking()) { if (jPlayer != null && cmat.equals(CMIMaterial.BEEHIVE) || cmat.equals(CMIMaterial.BEE_NEST)) { org.bukkit.block.data.type.Beehive beehive = (org.bukkit.block.data.type.Beehive) block.getBlockData(); if (beehive.getHoneyLevel() == beehive.getMaximumHoneyLevel() && (hand.equals(CMIMaterial.SHEARS.getMaterial())