Keep in mind it could be hard to make use POTC fast pass and be on time to the Pirates League if you arrive around 4. I'd suggest arriving by 3:30-3:45 so that you would be able to get in right away when they start letting party goers enter. It will take a little bit of time to get through security, the entry line, and get your party bracelet. Then you have to walk back to POTC and all the way through the long que (even if there isn't a minimal wait with FP which does occur sometimes). The ride is like 8-9 minutes long and there always seems to be a backup of a few boats at the end (waiting to get off at the end of the ride). I think 30 minutes will be cutting it close but if you get into MK right at 4 it is feasible (10 min to walk to ride and through que, 10 min to ride, and 10 min cushion). If you don't make it into the park until 4:10-4:15 due to a line to enter at 4 I can't see anyway you'd be able to ride POTC and not be late to pirates league.