Elias James O’Kane, 20, appeared in the Dunedin District Court yesterday after previously pleading guilty to assault with intent to injure.
Judge Dominic Flatley said the level of violence by the first-time offender was "concerning".
"You could have killed him. You could have seriously injured him; in fact, you may well have.
"Traumatic brain injuries have a life-long impact."
O’Kane was hosting a party at his North Dunedin flat on March 26 and the victim arrived with those who had previously lived at the property.
Shortly after midnight, the victim was preparing to leave when a comment by a third party led to a confrontation outside.
O’Kane punched the man in the side of the head, sparking a brawl during which they fell to the ground.
The defendant gained control and sat on the victim, raining down punches.
Bystanders pulled O’Kane away but he broke free and kicked the man in the head, knocking him out for five minutes.
The victim required five stitches for a wound to the back of his head and sustained a concussion, the court heard.
O’Kane told police he was angry at the time of the attack and thought the victim was planning to smash a window at his home.
He described his final blow as "like kicking a ball ... I don’t know what my intention was".
Counsel Karlena Lawrence told the court her client had consumed more alcohol than usual that night and had vowed not to do so again.
Probation assessed O’Kane as a low likelihood of further crimes and Judge Flatley highlighted the strong support provided by the man’s family and employer.
He was sentenced to five months’ community detention, 150 hours’ community work and 12 months’ supervision.
He was also ordered to pay the victim $400.