SPIGOT-5951: Projectile#getShooter() returns null

This commit is contained in:
md_5 committed 2020-07-06 17:51:33 +10:00
1 parent 0fa2eecffb
commit 7a9e4f7aeb
1 file changed
+1 -1
+1 -1
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
}