Yikes !
I had a sting when I was a child, but in the end I thought I got it from the sand. There had been a jelly fish washed up on the sand and although we knew better than to touch it, we hovered around looking at it. After, I had a place that burned quite badly for a while. I had to wonder if part of it's tentacles were in some of the sand near it unseen.
Sorry you had the experience, but you sound like you knew exactly what to do and stayed quite calm.
RE: Encounter with a jellyfish