Your bird has likely chosen you as its mate. Therefore, anything that the bird perceives as a threat to you and your well-being he will want to attack. Most times it will only be hormone change. It should pass, and everything will go back to normal. Vomiting is a little more serious sign that there's a problem.
Vomiting can be sign of distress, disease, or extreme stress.
Now remember that regurgitation is a natural behavior in birds. They bring up any food that is not entirely digested. Vomiting on the other hand is when the bird may vomit on itself or across it cases. It will be more sloppy and projecting. This something that is serious and should be examined by the vet.