What is it cTeam and how to use it?
#1
Question 
What is it cTeam class and how to use it, where I must use it, etc.?
Reply
Thanks given by:
#2
It's used in the scoreboard. I've never really used that mainly because it's per-world, not per-player, so I have no idea how to use it.
Reply
Thanks given by:
#3
Really wishing it was per-player. Could think of some really fun ways of using it.
Reply
Thanks given by:
#4
Is there no way to do it per server?

Basically I want to check at server start if certain teams exist, and if not create them. Then I want to do certain things with those teams like assign players to them, give them objectives, etc.

But if the scoreboards are per world, I guess there is no way?
Reply
Thanks given by:
#5
Disclaimer: my Minecraft knowledge stopped at around 1.6, so all of this new-fangled scoreboard/gamerule/commandblock stuff is magic to me.

As far as I can see @xdot implemented it so that it mirrored Vanilla exactly.


Each cScoreboard manages all objectives, teams and tracked players. It displays in three places where each place can only store one objective (did this change?). Since you can only have one scoreboard per world according to Vanilla, this is per world.
Each cTeam manages a team of players. It is per world, but tracks multiple players. It is added to cScoreboard, from whence it and other tracked teams can be queried through the global scoreboard object.
Each cObjective represents one objective, again added to cScoreboard, which tracks all objectives. It is one per-world, but one objective tracks its criterion for all the players in its world, and will display the score for each player when it is shown.


(04-11-2016, 07:06 AM)PureTryOut Wrote: Is there no way to do it per server?

Basically I want to check at server start if certain teams exist, and if not create them. Then I want to do certain things with those teams like assign players to them, give them objectives, etc.

But if the scoreboards are per world, I guess there is no way?

You can certainly check for a team's existence/create then/assign players to them via cScoreboard, but I don't think Vanilla allows you to assign objectives to teams? Objectives appear to be global.
Reply
Thanks given by:
#6
Well honestly I mainly need cTeam, but I need it per server.
Is there a way to implement it different in Cuberite as in Vanilla?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)