Charlie Darcy (34), who has a conviction for attempted murder, was today sentenced to four-and-a-half years imprisonment for the two incidents in the capital last year.
Dublin Circuit Court heard he has an "extensive history" of offending and that there has "rarely been a year" that he has been out of prison.
While on bail for the pub raid he was the front seat passenger of a car involved in a high-speed chase across Dublin.
When arrested by Gda Micheál Muldoon, of Sundrive Road garda station, he was in possession of a plastic bag containing the replica gun while masks and gloves were also recovered.
Evidence was previously given that on August 12, 2021, gardaí were on patrol in Drimnagh when they saw a car parked outside the Marble Arch bar with its lights on and ignition running. The pub was bought by UFC fighter Conor McGregor last year as part of his expanding business portfolio.
Gda Brendan D'Arcy, also of Sundrive Road garda station, said that the pub's alarm was ringing and that the shutter had been forced open while gardaí also heard noises coming from inside the premises.
Two men were then spotted trying to push a cash register underneath the pub door but retreated when they saw gardaí. The accused, of John's Lane West in Dublin 8, was found in a garden 50 metres away and arrested.
Judge Orla Crowe today described it as an "unsophisticated" burglary and noted that Charlie Darcy made "an intoxicated attempt to flee".
While on bail he was involved in the theft of a delivery driver's car on the South Circular Road on December 18 with two others.
The car was later observed travelling erratically in the south-inner city which included being driven on the wrong side of the road, around roundabouts the wrong way, and at times on two tyres while taking corners at speed. It later crashed at Long's Place in the south-inner city.
The court previously heard that Charlie Darcy was seen with a plastic bag and attempted to flee after the crash but was arrested by Gda Micheál Muldoon.
A search of the bag led to the discovery of a realistic looking imitation firearm while masks and gloves were also recovered.
Judge Crowe noted that the men were "clearly up to no good at the time" of the offence.
Defence counsel Keith Spencer BL submitted that his client was someone with an "extensive history of incarceration" who in his youth hung around with older individuals and "began to learn from their conduct".
The court was told that his client had a reliance on tablets which were a "particular bane" on his existence and resulted in him committing serious crime.
He said there has "rarely been a year" that Darcy has been at liberty but added that probation reports noted his motivation to change and that there is an intensive programme he is deemed suitable for.
The court heard Charlie Darcy has 43 previous convictions, including attempted murder, burglary and assault, with his earliest conviction in 2003 when he was aged 15.
Judge Crowe said reports noted he expressed a willingness to engage with the probation service but added that he was also deemed at a very high risk of reoffending,
She also said the accused was "endemic of a recidivist offender" and in mitigation took into account his guilty pleas and testimonials handed in on his behalf.
Charlie Darcy was given a three-year jail term for the pub raid and a two-year sentence for possession of the imitation firearm, to run consecutively.
The judge also suspended the final six months of the term resulting in a sentence of four-and-a-half years being imposed.
A co-defendant, convicted sex offender Jason Paget, last month was given the same jail term over the pub raid and dangerous driving incident.