diff options
Diffstat (limited to 'patches/server/0157-Add-PlayerArmorChangeEvent.patch')
-rw-r--r-- | patches/server/0157-Add-PlayerArmorChangeEvent.patch | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/patches/server/0157-Add-PlayerArmorChangeEvent.patch b/patches/server/0157-Add-PlayerArmorChangeEvent.patch index b0ad17cbab..87c9ce36ee 100644 --- a/patches/server/0157-Add-PlayerArmorChangeEvent.patch +++ b/patches/server/0157-Add-PlayerArmorChangeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 57ba53cf9f84b21185bbaefd482f9d6dea2cb772..77365cfbaf6b9eb2ebefdf174066b40d120fc295 100644 +index 57ba53cf9f84b21185bbaefd482f9d6dea2cb772..1d26fd55cd841c0f3ab4769a5a46a149fdc30b21 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java @@ -3140,6 +3140,13 @@ public abstract class LivingEntity extends Entity implements Attackable { @@ -13,7 +13,7 @@ index 57ba53cf9f84b21185bbaefd482f9d6dea2cb772..77365cfbaf6b9eb2ebefdf174066b40d if (this.equipmentHasChanged(itemstack1, itemstack2)) { + // Paper start - PlayerArmorChangeEvent -+ if (this instanceof ServerPlayer && enumitemslot.getType() == EquipmentSlot.Type.ARMOR) { ++ if (this instanceof ServerPlayer && enumitemslot.getType() == EquipmentSlot.Type.HUMANOID_ARMOR) { + final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack1); + final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack2); + new com.destroystokyo.paper.event.player.PlayerArmorChangeEvent((Player) this.getBukkitEntity(), com.destroystokyo.paper.event.player.PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent(); |