From 655d8407ceabc7eaad4085790b0e308b46734aa3 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 14 Dec 2016 14:38:55 +1100 Subject: SPIGOT-2918: Always call EnchantItemEvent --- nms-patches/ContainerEnchantTable.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nms-patches/ContainerEnchantTable.patch b/nms-patches/ContainerEnchantTable.patch index 71e79dd7..8072aa1c 100644 --- a/nms-patches/ContainerEnchantTable.patch +++ b/nms-patches/ContainerEnchantTable.patch @@ -106,12 +106,14 @@ this.b(); } } else { -@@ -177,24 +239,49 @@ +@@ -176,25 +238,50 @@ + if (!this.world.isClientSide) { List list = this.a(itemstack, i, this.costs[i]); - if (!list.isEmpty()) { +- if (!list.isEmpty()) { - entityhuman.enchantDone(j); -+ // CraftBukkit start ++ // CraftBukkit start ++ if (true || !list.isEmpty()) { boolean flag = itemstack.getItem() == Items.BOOK; + Map enchants = new java.util.HashMap(); + for (Object obj : list) { -- cgit v1.2.3