Meanwhile, Matene had found a BB gun that he had lent to a friend and decided to take it home.
The pair ended up at Domino's where Eli began abusing staff.
The manager told them they wouldn't be served if they kept yelling and swearing.
"At that point you, Mr Matene, jumped over the counter and hit the manager with the base of your gun," Judge Claire Ryan said.
She said Eli also jumped over the counter and pushed the manager from behind before demanding cash from the register while Matene pointed his gun at the manager's head.
The pair made off with $335.
When the police caught up with Eli, he said he was "just going to get my pizza and it got ugly".
"That," said Judge Ryan "is the understatement of the year".
Eli told authorities he was angry and "pissed off" about his pizza not arriving.
"I accept this was spontaneous. It was drunken thuggery," the judge said.
The manager was left with a swollen face.
In his victim impact statement he said he had trouble sleeping after the robbery.
"It came in my mind that he would shoot me and I was going to die. I started thinking about my family who I was going to leave behind for nothing."
Judge Ryan told the two men that if the manager fell over and cracked his skull they could have been up at the High Court facing a murder charge.
The pair's lawyers - John Anderson and Michael Kan - asked the court to take into account their clients' ages and that there was no premeditation.
Each served eight months in prison while waiting to be sentenced.
In sentencing Judge Ryan took into account their remorse and early guilty pleas.
"Your brains aren't fully developed at this stage - you are young and stupid."
But she said other young people did not go around robbing pizza shops with guns and beating people up.
She said both men had chances at rehabilitation and she would monitor their sentence.
The pair have also been ordered to pay $167.50 reparation each.
Both have criminal histories. Eli has convictions for three thefts and interfering with a car while Matene has received stolen property, three shoplifting charges, burglary and assaulting police.
While Matene was on bail for his latest charge he also took a metal pole and smashed up five cars. Those charges were included in his latest sentence.