Fire PlayerArmorChangeEvent for more cases
Dieser Commit ist enthalten in:
Ursprung
f0d45d4eab
Commit
814356359a
@ -1,11 +1,11 @@
|
||||
From 1350655d71b5c9ecdabe801c33678c48838a4535 Mon Sep 17 00:00:00 2001
|
||||
From 11940ada751fdf632cdd95c754ba8de96c2b1456 Mon Sep 17 00:00:00 2001
|
||||
From: pkt77 <parkerkt77@gmail.com>
|
||||
Date: Fri, 10 Nov 2017 23:46:34 -0500
|
||||
Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 46a09faf9..49e55ebdb 100644
|
||||
index 46a09faf9..316b66cc4 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -20,7 +20,7 @@ index 46a09faf9..49e55ebdb 100644
|
||||
|
||||
if (!ItemStack.matches(itemstack1, itemstack)) {
|
||||
+ // Paper start - PlayerArmorChangeEvent
|
||||
+ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR && !itemstack.getItem().equals(itemstack1.getItem())) {
|
||||
+ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) {
|
||||
+ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack);
|
||||
+ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1);
|
||||
+ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent();
|
||||
@ -42,5 +42,5 @@ index a9a133993..8f4b5dca9 100644
|
||||
return this.g;
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a4b32478b53f263fe1a08efe28c5ac09d5e85cef Mon Sep 17 00:00:00 2001
|
||||
From 08bbc4d2c03b381ae4444f6920fa37bf2a9a66e8 Mon Sep 17 00:00:00 2001
|
||||
From: kashike <kashike@vq.lc>
|
||||
Date: Wed, 15 Aug 2018 01:26:09 -0700
|
||||
Subject: [PATCH] Allow disabling armour stand ticking
|
||||
@ -141,7 +141,7 @@ index c604182dd..2c54e3e34 100644
|
||||
|
||||
public Vector3f r() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index fa4c593de..d94f5e609 100644
|
||||
index bca5136dc..497b5ceb5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2083,52 +2083,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@ -170,7 +170,7 @@ index fa4c593de..d94f5e609 100644
|
||||
-
|
||||
- if (!ItemStack.matches(itemstack1, itemstack)) {
|
||||
- // Paper start - PlayerArmorChangeEvent
|
||||
- if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR && !itemstack.getItem().equals(itemstack1.getItem())) {
|
||||
- if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) {
|
||||
- final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack);
|
||||
- final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1);
|
||||
- new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent();
|
||||
@ -226,7 +226,7 @@ index fa4c593de..d94f5e609 100644
|
||||
+
|
||||
+ if (!ItemStack.matches(itemstack1, itemstack)) {
|
||||
+ // Paper start - PlayerArmorChangeEvent
|
||||
+ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR && !itemstack.getItem().equals(itemstack1.getItem())) {
|
||||
+ if (this instanceof EntityPlayer && enumitemslot.getType() == EnumItemSlot.Function.ARMOR) {
|
||||
+ final org.bukkit.inventory.ItemStack oldItem = CraftItemStack.asBukkitCopy(itemstack);
|
||||
+ final org.bukkit.inventory.ItemStack newItem = CraftItemStack.asBukkitCopy(itemstack1);
|
||||
+ new PlayerArmorChangeEvent((Player) this.getBukkitEntity(), PlayerArmorChangeEvent.SlotType.valueOf(enumitemslot.name()), oldItem, newItem).callEvent();
|
||||
@ -277,5 +277,5 @@ index 9f5c3b92e..07ce93f17 100644
|
||||
// Paper end
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren