forked from SteamWar/SteamWar
@@ -34,6 +34,7 @@ import org.bukkit.event.block.Action;
|
||||
import org.bukkit.event.inventory.InventoryClickEvent;
|
||||
import org.bukkit.event.player.PlayerInteractEvent;
|
||||
import org.bukkit.inventory.EquipmentSlot;
|
||||
import org.bukkit.inventory.PlayerInventory;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
@@ -62,6 +63,7 @@ public class HotbarKitListener implements Listener {
|
||||
public void onInventoryClick(InventoryClickEvent event) {
|
||||
int slot = event.getSlot();
|
||||
if (slot < 0 || slot >= HotbarKit.HOTBAR_SIZE) return;
|
||||
if (!(event.getClickedInventory() instanceof PlayerInventory)) return;
|
||||
|
||||
Player player = (Player) event.getWhoClicked();
|
||||
click(player, slot, event);
|
||||
|
||||
Reference in New Issue
Block a user