SPIGOT-1931: Call PlayerFishEvent before modifying hooked entities velocity
Dieser Commit ist enthalten in:
Ursprung
00d333414a
Commit
45adbd9c6f
@ -46,10 +46,10 @@
|
||||
this.motY -= 0.20000000298023224D;
|
||||
this.a(SoundEffects.G, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
|
||||
f2 = (float) MathHelper.floor(this.getBoundingBox().b);
|
||||
@@ -391,6 +409,14 @@
|
||||
this.k();
|
||||
this.world.broadcastEntityEffect(this, (byte) 31);
|
||||
i = this.hooked instanceof EntityItem ? 3 : 5;
|
||||
@@ -388,6 +406,14 @@
|
||||
int i = 0;
|
||||
|
||||
if (this.hooked != null) {
|
||||
+ // CraftBukkit start
|
||||
+ PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.owner.getBukkitEntity(), this.hooked.getBukkitEntity(), (Fish) this.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_ENTITY);
|
||||
+ this.world.getServer().getPluginManager().callEvent(playerFishEvent);
|
||||
@ -58,9 +58,9 @@
|
||||
+ return 0;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
} else if (this.au > 0) {
|
||||
LootTableInfo.a loottableinfo_a = new LootTableInfo.a((WorldServer) this.world);
|
||||
|
||||
this.k();
|
||||
this.world.broadcastEntityEffect(this, (byte) 31);
|
||||
i = this.hooked instanceof EntityItem ? 3 : 5;
|
||||
@@ -400,6 +426,15 @@
|
||||
while (iterator.hasNext()) {
|
||||
ItemStack itemstack = (ItemStack) iterator.next();
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren