tag @e[family=!misc,type=!item,type=!xp_orb,r=3] add team:blue
tag @e[family=!misc,type=!item,type=!xp_orb,r=3] remove team:red
tag @e[family=!misc,type=!item,type=!xp_orb,r=3] remove team:yellow
tag @e[family=!misc,type=!item,type=!xp_orb,r=3] remove team:purple
tag @e[family=!misc,type=!item,type=!xp_orb,r=3] remove team:green
execute as @e[family=!misc,type=!item,type=!xp_orb,r=3] at @s run say ...has joined §1BLUE TEAM.