From 9b927aadac5508ea327e865e4beaaca26337c0d0 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Thu, 9 Jun 2022 17:51:26 +0200 Subject: [PATCH] Fix double activation Signed-off-by: Lixfel --- .../src/de/steamwar/fightsystem/fight/HotbarKit.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java b/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java index 3e41c98..aba29c7 100644 --- a/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java +++ b/FightSystem_Core/src/de/steamwar/fightsystem/fight/HotbarKit.java @@ -30,6 +30,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.block.Action; import org.bukkit.event.player.PlayerInteractEvent; +import org.bukkit.inventory.EquipmentSlot; import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.potion.PotionEffect; @@ -85,7 +86,7 @@ public class HotbarKit extends Kit { @EventHandler public void handlePlayerInteract(PlayerInteractEvent event) { - if(event.getAction() == Action.PHYSICAL) + if(event.getAction() == Action.PHYSICAL || event.getHand() != EquipmentSlot.HAND) return; Player player = event.getPlayer();