The Recorder of Leeds, Guy Kearl QC, told Bailey Lawson that if he finds himself in anymore trouble it was likely he would be jailed.
Lawson was involved in a fight in Pontefract in January of 2020 in which a male's arm was broken, but his sentence was deferred until this week at Leeds Crown Court.
The 21-year-old was given an 21-month sentence, suspended for 18 months,190 hours of unpaid work and told to pay £250 compensation to the victim.
Recorder Kearl said that he took into account Lawson being in full-time work and that his partner was expecting their child.
He said: "You had turned your life around by the time you came to this court.
"But let me make it clear, I will reserve this case to myself.
"If you breach the terms of the suspended sentence order you will come back before me.
"There's no reason for you to commit any offences.
"You have a steady life at home and have a good job. Stay out of trouble, do the work and all will be well.
"If you fail to do that, we will take a different course. Don't let me down."
Lawson, formerly of Willow Park, Pontefract, but now of The Hedgerows, Goole, admitted a charge of affray.
The court was told that there had been a history between Lawson and the victim when the fight broke out on Willow Park on January 7, 2020.
The incident was largely caught on CCTV, and showed Lawson pursuing the victim who fell and broke his arm, which needed surgery and a metal plate inserting.
Lawson had kneed the victim to the back and punched him.