Witam. W jaki sposób moge sprawdzić czy fireball dotyka ziemi a następnie wykonać eksplozje mój obecny kod
if(e.getAction() == org.bukkit.event.block.Action.LEFT_CLICK_AIR || e.getAction() ==org.bukkit.event.block.Action.LEFT_CLICK_BLOCK) {
if(p.getInventory().getItemInMainHand().equals(wand)) {
Fireball f = (Fireball) p.getWorld().spawnEntity(p.getEyeLocation().add(p.getEyeLocation().getDirection()), EntityType.FIREBALL);
f.setVelocity(p.getLocation().getDirection().multiply(3));
f.getWorld().createExplosion(f.getLocation(), 10f);
p.sendMessage("EKSPLOZJA!");
}
}