This seems like a glitch because that happened to me today also in kitpvp. I couldnt see them or hit them but they could hit me . I could only hit them with a bow fully drawn back because me and the other guy were stuck in a 1 by 1 hole. I think that this is a glitch