Hey, so I have been trying to make a datapack that would assign everyone who joins an ID, and moderators without OP can use that ID to put players on specific teams. Something like /trigger JoinBlueTeam set <ID>
For example, if a moderator typed the command /trigger JoinBlueTeam set 5. Billy, who has an ID of 5, would be put onto the Blue team.
If anyone knows how this could be done, please tell me. Studying other datapacks has not taught me much.
For example, if a moderator typed the command /trigger JoinBlueTeam set 5. Billy, who has an ID of 5, would be put onto the Blue team.
If anyone knows how this could be done, please tell me. Studying other datapacks has not taught me much.
5
Note vanilla minecraft isnt very good for rank permissions.
If mods dont have op and they use trigger commands, that means normal people would also be able to use it.
I suggest you go to the r/MinecraftCommands discord and ask for help there. I cannot find a vanilla friendly way to make this work with non-op people and without using some complicated system.
If mods dont have op and they use trigger commands, that means normal people would also be able to use it.
I suggest you go to the r/MinecraftCommands discord and ask for help there. I cannot find a vanilla friendly way to make this work with non-op people and without using some complicated system.
The scoreboard enable @a[tag=Moderator] Would make it so only people with the moderator tag could use the trigger.
I have seen simalar things on other datapacks,, I think it is possible I just have no idea how to do it.
I have seen simalar things on other datapacks,, I think it is possible I just have no idea how to do it.
Even if you set the value of 5 = Billy, You have to
Minecraft cannot execute within a function:
/execute if score @a JoinBlueTeam matches 5 run team join Blue_team <variable>
You have to manually state each id and person within the command which means it cant be automated
Minecraft cannot execute within a function:
/execute if score @a JoinBlueTeam matches 5 run team join Blue_team <variable>
You have to manually state each id and person within the command which means it cant be automated
actually it can be fully automated
you can execute as every players and do a simple comparation math to detect wich player is the right and then join the teams
you can execute as every players and do a simple comparation math to detect wich player is the right and then join the teams
Hey vip2kea, here is a download link to an example I made, d o w n l o a d
~it is fairly simple, took me less than 15 minutes to do
~includes two teams, red and blue / you must have the tag "Moderator" to use the triggers
~all code is commented, so you can unzip the files and learn how I did it
(made for 1.17 but its compatible with 1.16 and probably even less)
~it is fairly simple, took me less than 15 minutes to do
~includes two teams, red and blue / you must have the tag "Moderator" to use the triggers
~all code is commented, so you can unzip the files and learn how I did it
(made for 1.17 but its compatible with 1.16 and probably even less)
