Fix a few compile errors

This commit is contained in:
Nassim Jahnke 2024-06-14 13:07:50 +02:00
parent 6a34750160
commit 3c04f9f668
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
107 changed files with 205 additions and 317 deletions

View file

@ -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();