Skip to content

Commit 3d03eb8

Browse files
committed
Fix setting projectile shooter to null
1 parent 27dde87 commit 3d03eb8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/com/laytonsmith/abstraction/bukkit/entities/BukkitMCProjectile.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ public void setBounce(boolean doesBounce) {
4848
}
4949

5050
@Override
51-
public void setShooter(MCProjectileSource shooter) {
52-
proj.setShooter((ProjectileSource) shooter.getHandle());
51+
public void setShooter(MCProjectileSource shooter){
52+
if(shooter == null){
53+
proj.setShooter(null);
54+
} else {
55+
proj.setShooter((ProjectileSource) shooter.getHandle());
56+
}
5357
}
5458

5559
public Projectile asProjectile() {

0 commit comments

Comments
 (0)