SPIGOT-5951: Projectile#getShooter() returns null

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2020-07-06 17:51:33 +10:00
parent cb5bf362be
commit b482319b4b

View file

@ -15,7 +15,7 @@
this.shooter = entity.getUniqueID();
this.c = entity.getId();
}
+ this.projectileSource = (entity instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
+ this.projectileSource = (entity != null && entity.getBukkitEntity() instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
}