I have never done this and I cannot find a tutorial for 1.8 anywhere so I thought to ask it here.
What I want to do: Have a wand or philosophers stone that has like 1000 durability. Each time the player right clicks mob or block I want to take 5 durability to change blocks or 20 durability to change mobs. Could you point me in the right direction that would be good.