SPIGOT-5951: Projectile#getShooter() returns null

This commit is contained in:
md_5
2020-07-06 17:51:33 +10:00
parent 0fa2eecffb
commit 7a9e4f7aeb

View File

@@ -15,7 +15,7 @@
this.shooter = entity.getUniqueID(); this.shooter = entity.getUniqueID();
this.c = entity.getId(); 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
} }