From 8a3e6b74ba6ab1c814607108e324bb0414addb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hern=C3=A1n=20Ind=C3=ADbil=20de=20la=20Cruz=20Calvo?= Date: Sat, 31 Aug 2024 13:18:38 +0200 Subject: [PATCH] Forgot to call mend event before checking its state --- src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java index aefbe084e..69be9cddf 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/SkillUtils.java @@ -260,6 +260,7 @@ public final class SkillUtils { ExperienceOrb auxOrb = (ExperienceOrb) player.getWorld().spawnEntity(player.getLocation(), EntityType.EXPERIENCE_ORB); auxOrb.setExperience(damage / 2); PlayerItemMendEvent event = new PlayerItemMendEvent(player, itemStack, itemStack.getType().getEquipmentSlot(), auxOrb, damage); + Bukkit.getPluginManager().callEvent(event); if (!event.isCancelled() && event.getRepairAmount() != 0) { itemStack.setDurability((short) (itemStack.getDurability() - event.getRepairAmount())); }