how to spawn an entity at the location of another entity spigot code example
Example: spigot spawn entity
World myWorld = Bukkit.getWorld("world");
Location spawnLocation = new Location(myWorld, 0, 10, 0);
Entity spawnedPig = myWorld.spawnEntity(spawnLocation, EntityType.PIG);