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
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

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
} }