1
0
forked from xjboss/KCauldronX

Implement deprecated get/set shooter bukkit's methods

fix #368
This commit is contained in:
Sergey Shatunov 2016-02-14 22:46:12 +07:00
parent 3f7b5d0941
commit 232bc98881

View File

@ -18,7 +18,9 @@ public class CustomProjectileEntity extends CraftCustomEntity implements Project
@Override @Override
public LivingEntity _INVALID_getShooter() { public LivingEntity _INVALID_getShooter() {
throw new IllegalStateException("Not implemented!"); if (shooter instanceof LivingEntity)
return (LivingEntity) shooter;
return null;
} }
@Override @Override
@ -28,7 +30,7 @@ public class CustomProjectileEntity extends CraftCustomEntity implements Project
@Override @Override
public void _INVALID_setShooter(LivingEntity shooter) { public void _INVALID_setShooter(LivingEntity shooter) {
throw new IllegalStateException("Not implemented!"); this.shooter = shooter instanceof ProjectileSource ? (ProjectileSource) shooter : null;
} }
@Override @Override