From 89280f05f24f90a81501632c8d86a40bc88962a3 Mon Sep 17 00:00:00 2001 From: montlikadani Date: Thu, 5 Nov 2020 16:21:58 +0100 Subject: [PATCH] Fix right clicking on cow and get paid without bucket Fixes #991 --- .../com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index e552cacf..9ac87ad6 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -221,9 +221,11 @@ public class JobsPaymentListener implements Listener { return; ItemStack itemInHand = Jobs.getNms().getItemInMainHand(player); + if (itemInHand.getType() != Material.BUCKET && itemInHand.getType() != Material.BOWL) { + return; + } - if (itemInHand.getType() != Material.BUCKET - && (cow.getType() == EntityType.MUSHROOM_COW && itemInHand.getType() != Material.BOWL)) { + if (itemInHand.getType() == Material.BOWL && cow.getType() != EntityType.MUSHROOM_COW) { return; }