ALL Stephen John Moran wanted was a good night's sleep.

He got a court date instead.

Moran, 28, pleaded guilty to a charge of common assault last week in the Rockhampton Magistrates Court after he punched his neighbour's 13-year-old child.

The court heard on the night of August 19 the child was yelling and swearing loudly. Moran and his partner told the child to "shut up" numerous times.

Police prosecutor Constable Paige Barrow said Moran went next door and located the child.

She said Moran took the child outside where he held him on the front stairs and punched him in the rib area.

Defence lawyer Michael Stockall said Moran and his partner had made noise complaints to police about the child previously, but no action had been taken.

Mr Stockall said his client had to work the next day and was trying to sleep.

He said Moran had gone next door to confront the mother of the boy but was told by another child that she was sick.

He then returned home, but went back again when the boy swore at Moran's his partner.

Mr Stockall said Moran "may have punched him", but he wasn't sure.

Magistrate Barry Cosgrove took into account the circumstances surrounding the offence and recorded no conviction.

"But you can't take the law into your own hands," Mr Cosgrove said.

Moran was given a six month probation order.