3

I know that the question might be phrased in a way that confuses people, so please suggest edits.

My dilemma is this: I have teams, set up with a scoreboard. These are Winner and Player, for a PvP minigame in development.

I also want to add classes, however. My way of doing this now would be to create a team like classUnlocked and put players onto it as they unlock a certain class.

Sadly, minecraft can only have a player be on one team at once. How would I keep the Winner/Player system and also add Classes that can be permanently unlocked for a specific group of players? (the ones who purchased it)

3

Use the right tool for the job

Scoreboard teams have some unique features in that any player can only be in one team, they have special treatment for /spreadplayers and a variety of options regarding visibility and other things.

None of what you are doing truly seems to require teams at all. Why is there a player team? Why is there a Winner team? As in: In how far do you benefit from making them teams rather than something else (see below). The same is true for your class unlocks.

Use scoreboard objectives or tags instead

Both serve the purpose of adding an arbitarily high amount of properties to a player. Using objectives for this is a bit strange, however, which is the primary reason why Mojang introduced scoreboard tags in Minecraft 1.9.

If you are using 1.9 and can therefore use tags, it's as simple as

scoreboard players tag <targetSelector> add unlockKnight

You can now use @a[tag=unlockKnight] or @a[tag=!unlockKnight] as selectors in your other commands.

Note that you can't select a player by two tags at once, i.e. @a[tag=unlockKnight,tag=Winner] doesn't work. If such double-tagging is necessary for whatever reason, I suggest you turn one of the tags into an objective instead.

In 1.8, you can create a dummy-type objective for every unlock and set it to 1 for players who did unlock it.

  • Right. So you know, I'm relatively new to scoreboard commands, but I have quite a bit of experience with command blocks in general. The Players team represents people opted in to a game, and I have a block checking how many people there are on the Player team, then when there is one left transferring them to the winner team. I'm on 1.8, so I'm assuming I have to use the dummy objective, right? Thanks for the help regardless. – Wombatorks Feb 16 '16 at 16:26
  • @Wombatorks yeah, on 1.8, using a dummy objective for the class unlocks would be best, although they are a slight hassle to set up. – MrLemon Feb 16 '16 at 16:29
  • That's OK, I think I can handle it ;D. Again, thanks alot for your help. – Wombatorks Feb 16 '16 at 16:31
  • In 1.13, use /tag ... instead of /scoreboard players tag ... – pppery Aug 16 '18 at 20:35
0

Perhaps add teams that have the same privileges and functions of the two teams(eg. PlayerWinner) and add corresponding players to those teams. This would be the closest thing I can think of to be on two teams at once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.