mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-30 04:02:50 +01:00
[Bleeding] Re-add EntityShootBowEvent lost in e93a3eb3b4c5234e3e3936bc697d566a42d3b30e. Fixes BUKKIT-4214
In the 1.2 update for CraftBukkit, a missed diff resulted in Skeletons no longer firing an EntityShootBowEvent when they shoot an arrow.
This commit is contained in:
parent
e962b1bc09
commit
7f22899456
1 changed files with 13 additions and 1 deletions
|
@ -243,8 +243,20 @@ public class EntitySkeleton extends EntityMonster implements IRangedEntity {
|
|||
entityarrow.setOnFire(100);
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.be(), entityarrow, 0.8F);
|
||||
if (event.isCancelled()) {
|
||||
event.getProjectile().remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (event.getProjectile() == entityarrow.getBukkitEntity()) {
|
||||
world.addEntity(entityarrow);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
this.makeSound("random.bow", 1.0F, 1.0F / (this.aI().nextFloat() * 0.4F + 0.8F));
|
||||
this.world.addEntity(entityarrow);
|
||||
// this.world.addEntity(entityarrow); // CraftBukkit - moved up
|
||||
}
|
||||
|
||||
public int getSkeletonType() {
|
||||
|
|
Loading…
Reference in a new issue