#718: Add consumed item, hand and consumeItem boolean to EntityShootBowEvent

By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2020-08-31 18:39:12 +10:00
parent 393115aca2
commit 5d37d3d19d
4 changed files with 11 additions and 8 deletions

View File

@@ -17,7 +17,7 @@
((IProjectile) object).shoot((double) vector3fa.a(), (double) vector3fa.b(), (double) vector3fa.c(), f1, f2);
}
+ // CraftBukkit start
+ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(entityliving, itemstack, (Entity) object, f);
+ org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(entityliving, itemstack, itemstack1, (Entity) object, entityliving.getRaisedHand(), f, true);
+ if (event.isCancelled()) {
+ event.getProjectile().remove();
+ return;