geforkt von Mirrors/Paper
SPIGOT-4964: EntityPickupItemEvent for pandas
Dieser Commit ist enthalten in:
Ursprung
de9b85b8a1
Commit
49e15b4d9a
@ -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) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren