3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 04:20:08 +01:00

SPIGOT-4964: EntityPickupItemEvent for pandas

Dieser Commit ist enthalten in:
md_5 2019-05-20 19:54:24 +10:00
Ursprung de9b85b8a1
Commit 49e15b4d9a

Datei anzeigen

@ -9,6 +9,15 @@
public class EntityPanda extends EntityAnimal {
private static final DataWatcherObject<Integer> bA = DataWatcher.a(EntityPanda.class, DataWatcherRegistry.b);
@@ -445,7 +447,7 @@
@Override
protected void a(EntityItem entityitem) {
- if (this.getEquipment(EnumItemSlot.MAINHAND).isEmpty() && EntityPanda.bQ.test(entityitem)) {
+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, !(this.getEquipment(EnumItemSlot.MAINHAND).isEmpty() && EntityPanda.bQ.test(entityitem))).isCancelled()) { // CraftBukkit
ItemStack itemstack = entityitem.getItemStack();
this.setSlot(EnumItemSlot.MAINHAND, itemstack);
@@ -673,7 +675,7 @@
@Override
protected void a(EntityInsentient entityinsentient, EntityLiving entityliving) {