With the information provided, more than one diagnosis is plausible.
Here's the problem with that:
One possible diagnosis: You're still a greenhorn and you got carried away because you could jam on your own. You employed way too much force in your right hand. Practice more, play more and see that you don't cramp up as much, you'll build strength and stamina in no time.
Another: It's something very serious. Do not, under no circumstances, continue playing and seek medical help before you make it much worse.
Here's the problem with that:
One possible diagnosis: You're still a greenhorn and you got carried away because you could jam on your own. You employed way too much force in your right hand. Practice more, play more and see that you don't cramp up as much, you'll build strength and stamina in no time.
Another: It's something very serious. Do not, under no circumstances, continue playing and seek medical help before you make it much worse.