A question I answered on Quora: How do I gain muscle mass while still playing basketball?
The same way you’d gain muscle mass if not playing basketball.
The only significance of your participation in basketball is that it burns calories and uses up energy and time.
Adding mass = Taking in more calories than you burn.
Adding muscle = Lifting heavy weights.
Do these two things, and you will achieve your stated goal.