Homing Projectiles

Discussion in 'Spigot Plugin Help' started by EthanPVP, Apr 1, 2020.

  1. Hello!

    I'm working on a plugin for a friend's server, and I was wondering what you guys think the most effective way to create a homing projectile is.

    So far I have a plugin the shoots a fire charge when the player right-clicks with a firework in hand. I have a cool-down set up for it, and custom damage for the fire-charge.

    I'm looking for the best way to locate and track the nearest player for 5 seconds.
    When the player shoots this missile, it should find the closest player, move towards the player, following his movements, and hit the player OR explode after 5 seconds. What would yall recommend?