Scoreboard - Teams

Discussion in 'Plugin Development' started by 97WaterPolo, Jul 6, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    97WaterPolo

    Hello!

    I was wondering if someone could help me understand teams with scoreboards. Basically I am aiming to have players on a team, as well as have scoreboards that are individual to the player.

    I have board1 which I register the teams to, has no objectives or sort, the players never recieve this scoreboard.

    I have board 2, in which a new one is generated for the player each time it is called so it is player specific.

    When I start the game I set the scoreboard for each player to board2 so it is player specific, but I also add players to Teams that are registered to board1. It shows the players are on the team when I debug, but it seems to ignore the team prefix as well as the team options (friendly pvp) when the game starts.

    When I set the board to board1 it isn't per player anymore but JUST the prefixes work, friendly fire is still enabled. (might be another issue though, the friendly fire)

    Is there a way to do this as board 1 is a global scoreboard.
     
  2. Offline

    xTigerRebornx

    97WaterPolo It ignores the teams in board1 because the Player's scoreboard is board2, not board1. AFAIK, Players can only have one scoreboard, but you can always keep the prefix scoreboard and implement your own way of handling teams and friendly-fire and whatnot.
    As for that 2nd problem, I'd have to see code.
     
  3. Offline

    pookeythekid

    Considering I have no idea how to use scoreboards, I'd suggest starting over and storing all the data internally, within the plugin's code.

    But if you still want to use scoreboards, don't listen to the guy who has no idea how to use them. xD
     
    97WaterPolo likes this.
  4. Offline

    97WaterPolo

    xTigerRebornx
    If that is the case, how would I do per player scoreboards with teams that is player individual and can be updated? Objectives not score?
     
  5. Offline

    xTigerRebornx

    97WaterPolo You'd have to make your own "Teams" system, as the Players would have per-player scoreboards (meaning they couldn't be on the same scoreboard).
     
    97WaterPolo likes this.
  6. Offline

    97WaterPolo

    xTigerRebornx
    I can negate damage and such through a list of players on a team, but how would I do the prefix for a player's name to make it colored. I always thought you could use customDisplayname() but turns out it doesn't work for players. I was originally aiming to use scoreboards but that isn't working if I want per player scoreboards, so how would I set the name above a player to a certain color preferably without using TagAPI.
     
  7. Offline

    xTigerRebornx

    97WaterPolo It gets somewhat complicated when you want to have both per-Player Scoreboards and use the prefix/suffix of teams. I know NametagEdit (somewhat of a popular plugin) has a way without completely breaking scoreboards, which I believe uses packets. Look into how they do it.
     
    97WaterPolo likes this.
Thread Status:
Not open for further replies.

Share This Page