He doesn’t like me, but didn’t want my friend with us?

I was hanging out alone with one of my guy friends who I liked and at the time I thought maybe he had feelings for me too. But since then, he’s said he doesn’t. My friend was off doing her own thing but was going to meet up with us so I was checking my phone to make sure I didn’t miss her call/text. He kept telling me to stop checking it and basically not to tell her we were ready to meet up with her yet. In the meantime, just us two were hanging out and we were having a good time. Throughout the day, we’d gone to some shops around town, gotten dinner, and gone back to the hotel and just walked around the resort and there were some games like ping pong and shuffleboard. It was while we were playing the games that he made that comment and he didn’t seem to want her around. When she did finally call, he acted a little annoyed that we were interrupted. Since then, there’s also been situations where he seems jealous if I’m talking to another guy. He’s said I’m one of his closest friends. Seeing as he doesn’t have feelings for me, yet he knows how I feel about him, why would he act this way?
He doesn’t like me, but didn’t want my friend with us?
Post Opinion