An attacker staged a revenge beating on a man he had previously assaulted - after warning that "grasses get slashes and snitches get stitches"
Joshua Ewart, 21, first attacked his victim in July 2014 when he threw him to the ground during a gang attack, at Holmeside, Sunderland, leaving him battered and bruised.
Newcastle Crown Court heard Ewart was arrested and bailed but would "shout over" at the victim if he saw him in the street.
Barry Robson, prosecuting, said: "He recalls Ewart would shout over from the other side of the street when he saw him, saying 'grasses get slashes and snitches get stitches'."
The court heard Ewart lashed out again at his victim during a chance meeting at Fawcett Street, Sunderland, in March last year.
Mr Robson said: "Ewart began to punch him. The complainant tried to defend himself but had his jacket pulled over his face. He felt himself getting hit to the rear of his head.
"This was happening in broad daylight, in the middle of the afternoon. A small crowd gathered and people were trying to break it up."
Ewart, of Mansell Crescent, Peterlee, pleaded guilty to assault in relation to the first attack and affray in relation to the second.
Mr recorder Peter Makepeace said Ewart's behaviour was like a "pretend gangster" and told him: "The assault in itself was serious. The seriousness of the affray is it was an attack on this court system.
"This entire system depends on witnesses coming to court to give evidence. Anything that interferes with that is ordinarily marked with an immediate custodial sentence."
The judge said Ewart's sentence could be suspended because he has stayed out of trouble for more than a year since the last attack, is now on an apprenticeship and has made his own, efforts to rehabilitate himself.
The judge told him: "You do not presently present a danger to the public or any particular member of the public."
Ewart was sentenced to 16 months imprisonment, suspended for two years, with 200 hours unpaid work.
Lee Fish, defending, said Ewart's attempts to "frustrate" the court process proved pointless and he now regrets his past behaviour.
Mr Fish added: "These offences are old. It appears he has demonstrated an ability to keep out of trouble.
"He was associating with the wrong people, drinking too much and engaging in use of drugs, which, it appears, he has put behind him.
"In 2014 to 2015 there was a danger that his life was spiraling out of control. That has not happened."