1
0
Fork 0

Fix crash with indirect damage when indirect entity == null, for example

thrower is not entity.

Fix #361
kcx-1614
Sergey Shatunov 2016-02-11 12:45:35 +07:00
parent cdc6bcae21
commit 7eba5f9dee
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@
super(p_i1568_1_, p_i1568_2_);
this.indirectEntity = p_i1568_3_;
+ // KCauldron start - pass projectlie source
+ if (damageSourceEntity != null && damageSourceEntity.getBukkitEntity() instanceof org.bukkit.entity.Projectile && indirectEntity.getBukkitEntity() instanceof org.bukkit.projectiles.ProjectileSource)
+ if (damageSourceEntity != null && damageSourceEntity.getBukkitEntity() instanceof org.bukkit.entity.Projectile && indirectEntity != null && indirectEntity.getBukkitEntity() instanceof org.bukkit.projectiles.ProjectileSource)
+ ((org.bukkit.entity.Projectile) damageSourceEntity.getBukkitEntity()).setShooter((org.bukkit.projectiles.ProjectileSource) indirectEntity.getBukkitEntity());
+ // KCauldron end
}