What does it mean when he playfully nudges you?

Is he flirting? Because I noticed he would do it when our mutual female friend left. He did it once before in front of her.

Also I read somewhere that if a guy digs you, the more he denies it the more he likes you? And he's kind of mean to me when he's out with his friends... I also read that guys hate appearing soft in front of their mates?
What does it mean when he playfully nudges you?
Post Opinion