From 0494e5643f8b00de0d428fbf19af083f717d8737 Mon Sep 17 00:00:00 2001 From: xGinko Date: Mon, 13 Nov 2023 14:17:39 +0100 Subject: [PATCH] minor adjustments --- .../modules/mechanics/RateLimitPumpkinExplosions.java | 2 +- .../modules/triggers/ExplodePumpkinOnRightClick.java | 2 +- .../modules/triggers/ExplodePumpkinOnShear.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/xginko/pumpkinpvpreloaded/modules/mechanics/RateLimitPumpkinExplosions.java b/src/main/java/me/xginko/pumpkinpvpreloaded/modules/mechanics/RateLimitPumpkinExplosions.java index fbe7b29..bcd1cdd 100644 --- a/src/main/java/me/xginko/pumpkinpvpreloaded/modules/mechanics/RateLimitPumpkinExplosions.java +++ b/src/main/java/me/xginko/pumpkinpvpreloaded/modules/mechanics/RateLimitPumpkinExplosions.java @@ -51,8 +51,8 @@ private void onPrePumpkinExplode(PrePumpkinExplodeEvent event) { if (this.players_on_cooldown.getIfPresent(exploderUniqueId) == null) { this.players_on_cooldown.put(exploderUniqueId, true); } else { - event.setCancelled(true); event.setPrecedingCancelled(true); + event.setCancelled(true); } } } diff --git a/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnRightClick.java b/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnRightClick.java index 167d43b..18985d0 100644 --- a/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnRightClick.java +++ b/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnRightClick.java @@ -46,7 +46,7 @@ public void disable() { } @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - private void onBlockLeftClick(PlayerInteractEvent event) { + private void onBlockRightClick(PlayerInteractEvent event) { if (!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return; final Block clicked = event.getClickedBlock(); diff --git a/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnShear.java b/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnShear.java index 1c43a15..97a48c7 100644 --- a/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnShear.java +++ b/src/main/java/me/xginko/pumpkinpvpreloaded/modules/triggers/ExplodePumpkinOnShear.java @@ -55,7 +55,7 @@ public void disable() { } @EventHandler(priority = EventPriority.HIGHEST, ignoreCancelled = true) - private void onBlockLeftClick(PlayerInteractEvent event) { + private void onBlockRightClick(PlayerInteractEvent event) { if (!event.getAction().equals(Action.RIGHT_CLICK_BLOCK)) return; final Block clicked = event.getClickedBlock();