Memo to Latrell Sprewell and his legal team: When a federal judge gives you advice, take it.

On Friday, U.S. District Judge Vaughn Walker slammed the NBA superstar and his legal advisers with rarely invoked Rule 11 sanctions for bringing a frivolous suit against the National Basketball Association. Back in July, Walker warned Sprewell and his lawyers that the complaint was perilously close to being deemed frivolous. They refiled the case, anyway. On Friday, he dismissed the case and ordered the sanctions, implying that he would include the defendants’ legal fees in the award.