@EventHandler(priority = EventPriority.LOWEST)
    public void onCraftItem(CraftItemEvent event) {
        if (!(event.getWhoClicked() instanceof Player) || event.isCancelled()) {
            return;
        }
        Player player = (Player) event.getWhoClicked();

        ShapelessRepairRecipe recipe = plugin.getRepairRecipeFor(event.getRecipe().getResult());

        if (recipe != null && recipe.checkIngredients(event.getInventory().getMatrix())) {
            if (RepairRecipeConfig.DEBUG) RepairRecipe.logger.info("Found Recipe: " + recipe.toString());
            List<HumanEntity> players = new ArrayList<HumanEntity>();
            players.add(player);

            if (!plugin.getConfigurator().hasPermission(player, RepairRecipeConfig.PERM_REPAIR)) {
                event.setResult(Event.Result.DENY);
                player.sendMessage("Insufficient permissions to repair item.");
                return;
            }

            ItemStack repairedItem = recipe.repairItem(event.getInventory(), true, players);
            if (repairedItem == null) {
                event.setResult(Event.Result.DENY);
                return;
            }

            event.setCurrentItem(repairedItem);
            player.playSound(player.getLocation(), Sound.ANVIL_USE, 1f, 1f);
        }


    }