From 10f9ff22a44b849e9cc250effb5aefa8175ca85b Mon Sep 17 00:00:00 2001 From: Zrips Date: Mon, 21 Jun 2021 17:37:49 +0300 Subject: [PATCH] We HAVE to ignore canceled events --- .../com/gamingmesh/jobs/listeners/JobsPayment14Listener.java | 2 +- .../java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPayment14Listener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPayment14Listener.java index 8ad7daa6..5064ab26 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPayment14Listener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPayment14Listener.java @@ -62,7 +62,7 @@ public final class JobsPayment14Listener implements Listener { } } - @EventHandler + @EventHandler(priority = EventPriority.MONITOR, ignoreCancelled = true) public void onBlockBreak(BlockBreakEvent event) { if (event.getBlock().getType() != Material.CAMPFIRE || campPlayers.isEmpty()) return; diff --git a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java index bb40b1ea..909bd1e2 100644 --- a/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java +++ b/src/main/java/com/gamingmesh/jobs/listeners/JobsPaymentListener.java @@ -390,7 +390,7 @@ public final class JobsPaymentListener implements Listener { Jobs.action(jPlayer, new ItemActionInfo(contents, ActionType.BREW)); } - @EventHandler(priority = EventPriority.HIGHEST) + @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) public void onBlockBreak(BlockBreakEvent event) { final Block block = event.getBlock();