After around 5 years of procrastinating, I've finally gotten around to recoding this and changing some things around!
The largest change was changing the item from a blaze rod to a diamond hoe. This is so I could easily add durability to the staff.
I also changed the functionality to be on left click. This because I found that right clicking would cause it to double cast in some cases, making the durability go down more than I intended.
If you find any bugs or have any requests, feel free to tell me in the discussion tab!