Early on, you have no choice but to listen to the barking of your hamstring.
The tricky part is when it feels like it's 80% or 90%...you think you're ready to go out and run around again, but, you're really not. You'll keep re-injuring it, it's almost a given.
Also, not sure if you stretch before you play ball....I never did until I turned 26 or 27, and then it was a necessity....anyway, if you do not stretch, you're going to want to start stretching the hammy before you play, once you're back on the field.
I hate to come off like an expert, I'm not, but I did pull hamstrings in both legs, at different times, both while playing softball.....and I learned a lot, both what to do and what not do, after pulling the first one.
By the way, nothing will ever top the last game I ever played without stretching....towards the end of the game, I hit a weak grounder to 3rd, and, because of my lack of speed I at least always ran hard....so, while running as hard as I could to 1st, I managed to pull both quads at once.....I went down like a ton of bricks. So, from that day on, I always took some time before games to stretch.
Anyway, blah blah blah, like I said last night, I hope the pain abates soon and that you're back to 100% quickly.