My 7 month old is very similar, he gets 'time out' for a few minutes to calm down in the bathroom when he's really being obnoxious (ie. when he attacks feet or legs).
My hope for a solution is to get another cat around the same age or a bit younger so that they can play together, if that's an option for you then it may be worth looking into.
My hope for a solution is to get another cat around the same age or a bit younger so that they can play together, if that's an option for you then it may be worth looking into.