If you steal rocks it's perfectly legal.. if you attack someone repeatedly after they tell you to stop (and they aren't attacking you back) that is harassment and it is not legal.
(usually what happens when a group of people steal your rocks and one is constantly attacking you while the other steals)