How to get tamed wolves to not attack other players?

I am playing Minecraft with my friend. I like having tamed wolves, but it's so easy to accidentally have them go into murder-mode on my teammate. Is there any way to get them to never become hostile towards other players? Maybe some kind of server command?


Solution 1:

Wolves will not attack other players if the player and the wolf owner are on the same team.

To create a team:

/scoreboard teams add Friendly

To add players to it:

/scoreboard teams join Friendly @a