SPIGOT-6023, SPIGOT-6745: Fix missing BlockDispenseArmorEvents
By: Lars Dormans <lars.dormans@live.nl>
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
public class ItemArmor extends Item implements ItemWearable {
|
||||
|
||||
private static final UUID[] ARMOR_MODIFIER_UUID_PER_SLOT = new UUID[]{UUID.fromString("845DB27C-C624-495F-8C9F-6020A9A58B6B"), UUID.fromString("D8499B04-0E66-4726-AB29-64469D734E0D"), UUID.fromString("9F3D476D-C118-4544-8365-64846904B48E"), UUID.fromString("2AD3F246-FEE1-4E67-B886-69FD380BB150")};
|
||||
@@ -54,6 +59,32 @@
|
||||
@@ -54,8 +59,34 @@
|
||||
EntityLiving entityliving = (EntityLiving) list.get(0);
|
||||
EnumItemSlot enumitemslot = EntityInsentient.getEquipmentSlotForItem(itemstack);
|
||||
ItemStack itemstack1 = itemstack.cloneAndSubtract(1);
|
||||
@@ -41,7 +41,10 @@
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
entityliving.setSlot(enumitemslot, itemstack1);
|
||||
- entityliving.setSlot(enumitemslot, itemstack1);
|
||||
+ entityliving.setSlot(enumitemslot, CraftItemStack.asNMSCopy(event.getItem()));
|
||||
+ // CraftBukkit end
|
||||
if (entityliving instanceof EntityInsentient) {
|
||||
((EntityInsentient) entityliving).a(enumitemslot, 2.0F);
|
||||
((EntityInsentient) entityliving).setPersistent();
|
||||
|
||||
Reference in New Issue
Block a user