A man who punched his neighbour has received a suspended sentence