My question involves search and seizure law in the State of: MA
So, i was driving to my friends house. knocked on the door, but he didnt answer cause he was sleeping. Then i leave pull in to a convenience store down the street and park. Then all of a sudden a car pulls up next to me two seconds later. A guy gets out, then comes around and opens my door (at this point im shocked and didnt know what was going on, for all i knew i was getting carjacked). Then tells me hes the police, lifts up his shirt and shows me his badge/gun and then asks if i have drugs or anything on me. i say no. he then says dont bullshit me, if i find something your going to jail. i say i dont have anything. then he asks for my id and registration. i gave him both he then gives it to another guy who goes into his cruiser. then, he asks to search me and my car and i say i dont consent to a search of my vehicle. he then says "dont play that, get out of the car" so i get out, he searches my car and found nothing. he didnt even give me a reason why he approached me in the first place. he just said there was a bunch of breaking and enterings in the area after he found nothing... when he left and found nothing, 2 police cruisers and a van left along behind him from the back of the store (which pulled in as they were talking to me).... he didn't give me his name or anything, also he wasn't in uniform. none of the officers there were ... so was i illegally searched and did i have my rights violated? What can i do about it?