SteamWar/FightSystem
Archiviert
13
1

Fix double activation
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-09 17:51:26 +02:00
Ursprung 58557214ce
Commit 9b927aadac

Datei anzeigen

@ -30,6 +30,7 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.Action; import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.potion.PotionEffect; import org.bukkit.potion.PotionEffect;
@ -85,7 +86,7 @@ public class HotbarKit extends Kit {
@EventHandler @EventHandler
public void handlePlayerInteract(PlayerInteractEvent event) { public void handlePlayerInteract(PlayerInteractEvent event) {
if(event.getAction() == Action.PHYSICAL) if(event.getAction() == Action.PHYSICAL || event.getHand() != EquipmentSlot.HAND)
return; return;
Player player = event.getPlayer(); Player player = event.getPlayer();