When players use eyes of ender, they fly into the air and towards the nearest stronghold. How can I change their target while preserving everything else about their behaviour? (e.g. dropping as items again, occasionally exploding, moving in a straight line).
You should try to cancel the ProjectileLaunchEvent for the EnderPearl. Then check for right clicks with an ender pearl equipped in the PlayerInteractEvent and implement your new functionality there.
You should read the question You could decompile this plugin to see how it does it https://dev.bukkit.org/projects/enderchanger Edit: with a quick look at the javadoc I found this method https://hub.spigotmc.org/javadocs/b...l.html#setTargetLocation-org.bukkit.Location-
You'll need to get the https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/entity/EnderSignal.html first and then use the setTargetLocation() method.