2. Each beach volleyball match has four players on the court. In a beach volleyball tournament, it is known that $n$ players have played a total of $n$ matches, and any two players have played at least one match together. Find the maximum value of $n$.


A beach volleyball match requires four players, any two of whom form a team, so there are $\mathrm{C}_{4}^{2}=6$ combinations. According to the problem, any two players must meet in at least one match, so the total number of two-player groups $\mathrm{C}_{n}^{2}$ is at most 6 times the number of matches. Therefore,
$$
\frac{n(n-1)}{2} \leqslant 6 n \Rightarrow n \leqslant 13 \text {. }
$$

When $n=13$, number the 13 players as $1,2, \cdots, 13$, and use these as the vertices of a regular 13-sided polygon arranged counterclockwise. Let the players in the $i$-th match ($1 \leqslant i \leqslant 13$) be $i, i+2, i+3, i+7$ (under modulo 13), and it is easy to verify that this satisfies the problem's requirements.