There shouldbe a /team command
Where you do /team username
Then t will say to that person Player is wanting to team with you
Then the person does /Team accept
Then they cannot attack each other
To break a team do /Team break Player
Where you do /team username
Then t will say to that person Player is wanting to team with you
Then the person does /Team accept
Then they cannot attack each other
To break a team do /Team break Player