mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Fix Naming issue inside Add PlayerArmorChangeEvent (#11614)
This commit is contained in:
parent
b2cf880b79
commit
5a9b3c9e23
@ -9,13 +9,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||||
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||||
|
throw new MatchException((String) null, (Throwable) null);
|
||||||
|
}
|
||||||
|
|
||||||
itemstack = this.getItemBySlot(enumitemslot);
|
- ItemStack itemstack2 = itemstack1;
|
||||||
|
+ ItemStack itemstack2 = itemstack1; final ItemStack oldEquipment = itemstack2; // Paper - PlayerArmorChangeEvent - obfhelper
|
||||||
|
|
||||||
|
- itemstack = this.getItemBySlot(enumitemslot);
|
||||||
|
+ itemstack = this.getItemBySlot(enumitemslot); final ItemStack newEquipment = itemstack;// Paper - PlayerArmorChangeEvent - obfhelper
|
||||||
if (this.equipmentHasChanged(itemstack2, itemstack)) {
|
if (this.equipmentHasChanged(itemstack2, itemstack)) {
|
||||||
+ // Paper start - PlayerArmorChangeEvent
|
+ // Paper start - PlayerArmorChangeEvent
|
||||||
+ if (this instanceof ServerPlayer && enumitemslot.getType() == EquipmentSlot.Type.HUMANOID_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 oldItem = CraftItemStack.asBukkitCopy(oldEquipment);
|
||||||
+ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack2);
|
+ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(newEquipment);
|
||||||
+ new com.destroystokyo.paper.event.player.PlayerArmorChangeEvent((Player) this.getBukkitEntity(), com.destroystokyo.paper.event.player.PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent();
|
+ new com.destroystokyo.paper.event.player.PlayerArmorChangeEvent((Player) this.getBukkitEntity(), com.destroystokyo.paper.event.player.PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent();
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end - PlayerArmorChangeEvent
|
+ // Paper end - PlayerArmorChangeEvent
|
||||||
|
Loading…
Reference in New Issue
Block a user