A teenager fired an air gun into the front door of a flat in a dispute about cash, Lincoln Crown Court was told.
Joshua Cook had accused Graham Whiting, the tenant of the flat, of stealing £20 from him and had earlier turned up at his door “ranting and raving”.
Gurdial Singh, prosecuting, said that three days later Cook went back to Mr Whiting’s flat in the Jarvis House tower block on Ashby Avenue, Lincoln and again banged on the door.
Mr Whiting did not open the door and instead checked who was calling by looking through a spy hole.
Moments later Cook pushed a six-inch bladed knife through the letter box.
Mr Whiting refused to open up after the knife incident but soon afterwards Cook returned.
Mr Singh told the court: “The complainant looked through the spyhole and saw the defendant with an air rifle which he was pointing at the front door. Mr Whiting took cover and then heard a loud bang.”
Cook shouted: “I don’t give a f**k if you call the police. I’m off my head on blueys.”
Mr Whiting then looked through the spyhole to see Cook reloading the gun.
He called police who arrived at the scene to find two air gun pellets on the ground outside his flat.
Officers then went to Cook’s flat in the same block. He admitted having a knife but denied having a gun.
Mr Singh said: “Officers formed the opinion that he was under the influence of something. He was foaming at the mouth.”
When Cook was interviewed he said he had loaned the complainant £20 and banged on the door demanding his money back.
Cook, 19, formerly of Jarvis House, Lincoln, and now of Nettleham Road, Lincoln, admitted charges of possession of an imitation firearm with intent to cause fear of violence and possession of a bladed article as a result of the incident on December 11 2016.
He was sent to a young offenders’ institution for two years and given a five year restraining order banning him from contacting Graham Whiting and banning him from entering Jarvis House flats.
Judge Michael Heath, passing sentence, told him: “You were plainly under the influence of drugs. There is an element in this case of taking the law into your own hands.”
David Eager, in mitigation, described Cook as a very young and immature teenager.
He said Cook’s mother was prepared to allow him back home if he were to be given a chance and had laid down strict ground rules for him staying with her.