怎么通过 EntityDamageByEntityEvent 获取到这个雪球是谁发出来的?
本帖最后由 wshycaa 于 2019-3-9 23:15 编辑
source = ((Projectile)e.getDamager()).getShooter() //source为发射者(楼主可以领钻石稿勋章)
雪球的话,可以前面加个if (e.getDamager() instanceof Snowball)
来判断
source = ((Projectile)e.getDamager()).getShooter() //source为发射者(楼主可以领钻石稿勋章)
雪球的话,可以前面加个if (e.getDamager() instanceof Snowball)
来判断