Period

So my boyfriend and I were having sex constantly with protection and he would ejaculate inside of me . On the 13th I started having really bad cramps . My period came today and I’m still having these cramps for like 3 hours .. what can be the cause of this ?