From 580c156672ee873a3bca09f944ce707221892065 Mon Sep 17 00:00:00 2001 From: Wanbin Cao <93872019+Lagggpixel@users.noreply.github.com> Date: Mon, 16 Oct 2023 14:07:28 +0100 Subject: [PATCH] Update ArenaEvents.java --- .../projects/thebridge/arena/ArenaEvents.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/java/plugily/projects/thebridge/arena/ArenaEvents.java b/src/main/java/plugily/projects/thebridge/arena/ArenaEvents.java index a6b232a..6a54fee 100644 --- a/src/main/java/plugily/projects/thebridge/arena/ArenaEvents.java +++ b/src/main/java/plugily/projects/thebridge/arena/ArenaEvents.java @@ -499,11 +499,13 @@ public void onBowShot(EntityShootBowEvent event) { if (user.getKit().getOptionalConfiguration("bow-cooldown") != null) { cooldown = Math.max(0, (int) user.getKit().getOptionalConfiguration("bow-cooldown")); } - user.setCooldown("bow_shot", cooldown); - Player player = (Player) event.getEntity(); - plugin - .getBukkitHelper() - .applyActionBarCooldown(player, cooldown); + if (cooldown != 0) { + user.setCooldown("bow_shot", cooldown); + Player player = (Player) event.getEntity(); + plugin + .getBukkitHelper() + .applyActionBarCooldown(player, cooldown); + } if(event.getBow() != null) { VersionUtils.setDurability(event.getBow(), (short) 0); }