mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
SPIGOT-2918: Always call EnchantItemEvent
By: md_5 <git@md-5.net>
This commit is contained in:
parent
54e60aee75
commit
694b7ad459
1 changed files with 5 additions and 3 deletions
|
@ -106,12 +106,14 @@
|
||||||
this.b();
|
this.b();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -177,24 +239,49 @@
|
@@ -176,25 +238,50 @@
|
||||||
|
if (!this.world.isClientSide) {
|
||||||
List list = this.a(itemstack, i, this.costs[i]);
|
List list = this.a(itemstack, i, this.costs[i]);
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
- if (!list.isEmpty()) {
|
||||||
- entityhuman.enchantDone(j);
|
- entityhuman.enchantDone(j);
|
||||||
+ // CraftBukkit start
|
+ // CraftBukkit start
|
||||||
|
+ if (true || !list.isEmpty()) {
|
||||||
boolean flag = itemstack.getItem() == Items.BOOK;
|
boolean flag = itemstack.getItem() == Items.BOOK;
|
||||||
+ Map<org.bukkit.enchantments.Enchantment, Integer> enchants = new java.util.HashMap<org.bukkit.enchantments.Enchantment, Integer>();
|
+ Map<org.bukkit.enchantments.Enchantment, Integer> enchants = new java.util.HashMap<org.bukkit.enchantments.Enchantment, Integer>();
|
||||||
+ for (Object obj : list) {
|
+ for (Object obj : list) {
|
||||||
|
|
Loading…
Reference in a new issue