SteamWar/FightSystem
Archiviert
13
1

Fix HotbarKit pressure plates
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2022-06-05 13:55:32 +02:00
Ursprung fc54a8afd2
Commit dbcf893078

Datei anzeigen

@ -28,6 +28,7 @@ import de.steamwar.fightsystem.states.StateDependentListener;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler; 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.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
@ -84,6 +85,9 @@ public class HotbarKit extends Kit {
@EventHandler @EventHandler
public void handlePlayerInteract(PlayerInteractEvent event) { public void handlePlayerInteract(PlayerInteractEvent event) {
if(event.getAction() == Action.PHYSICAL)
return;
Player player = event.getPlayer(); Player player = event.getPlayer();
int slot = player.getInventory().getHeldItemSlot(); int slot = player.getInventory().getHeldItemSlot();
Kit activeKit = activeKits.get(player); Kit activeKit = activeKits.get(player);