@EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true)
    public void onDragMenu(InventoryDragEvent event) {
        if (event.getWhoClicked() instanceof Player) {
            Player player = (Player) event.getWhoClicked();
            Inventory top = event.getView().getTopInventory();
            int numInTop = top.getSize();

            for (int rawSlot : event.getRawSlots()) {
                if (rawSlot >= numInTop) {
                    int slot = event.getView().convertSlot(rawSlot);
                    if (player.hasPermission("cyom.slot.lock." + slot)
                            && !player.hasPermission("disable.slot.locking")) {
                        event.setCancelled(true);
                        return;
                    }
                }
            }

            if (top.getHolder() instanceof Menu) {
                Menu menu = (Menu) top.getHolder();

                // Just to be on the safe side, let's make sure any drags are
                // also cancelled, so non-editing players cannot make changes
                // to the menus
                if (!menu.isEditing(player)) {
                    event.setCancelled(true);
                }
            }

        }
    }