team and magic system

I am making a datapack for my server which will include teams and a magic system. What i want to do is letting players create team/alliances (without a moderator doing it for them) and when they use a magic spell their teammates shouldn't take damage from it.

Continue to help post