diff options
author | Nassim Jahnke <[email protected]> | 2024-06-14 13:07:50 +0200 |
---|---|---|
committer | Nassim Jahnke <[email protected]> | 2024-06-14 13:07:50 +0200 |
commit | 3c04f9f668c3a42cb294c5e55a846793894312e5 (patch) | |
tree | c762ee49a5c4d13de6e2fffb70ca2193dd8a2905 /patches/server/0157-Add-PlayerArmorChangeEvent.patch | |
parent | 6a34750160dd86201db605210eb638eb33d897a1 (diff) | |
download | Paper-3c04f9f668c3a42cb294c5e55a846793894312e5.tar.gz Paper-3c04f9f668c3a42cb294c5e55a846793894312e5.zip |
Fix a few compile errors
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(); |