i'm trying to make the hostile mobs on my server passive by adding them to the same team as the players.
I've made a team 'test' and added the players into the team.
Now i've to add all the hostile mobs in the game to that team, but i can't just run the command once, it needs to keep running in the spawn chunk.
So i added a command block on loop and made it target all entities using @e. but that causes severe lag and strain on the server, so i have to add just the hostile mobs by name.
Can some one tell me how i can add the hostile mobs to the team using the command below?
/scoreboard teams join test @e[type=skeleton,type=creeper,type=zombie]
final note:
It will only allow you to add so many target selectors. It might be worth just slowing down the clock if you are having lag issues. Assuming you put this in a repeating command block
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
i'm trying to make the hostile mobs on my server passive by adding them to the same team as the players.
I've made a team 'test' and added the players into the team.
Now i've to add all the hostile mobs in the game to that team, but i can't just run the command once, it needs to keep running in the spawn chunk.
So i added a command block on loop and made it target all entities using @e. but that causes severe lag and strain on the server, so i have to add just the hostile mobs by name.
Can some one tell me how i can add the hostile mobs to the team using the command below?
If this command works
/scoreboard teams join test @e[type=skeleton]
It is should just be
/scoreboard teams join test @e[type=skeleton,type=creeper,type=zombie]
final note:
It will only allow you to add so many target selectors. It might be worth just slowing down the clock if you are having lag issues. Assuming you put this in a repeating command block