Scoreboards teams multiple objectives (Nametags?)

Discussion in 'Plugin Development' started by Unica, Jul 18, 2015.

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

    Unica

    Good day,

    I'm currently working on my scoreboard add-on for a game, and i've encountered a problem.

    Basically, i have this scoreboard which is for every client different (every client gets a different scoreboard object). The scoreboard displays coins and whatnot, and it works as it should.

    I want to colour the persons' nametag to a certain colour by using the Team object which comes with
    the Scoreboard API. I register the team on the scoreboard the player has, I just assign the player and the scoreboard coloring works. (using Team#setPrefix)

    However, since the scoreboard is just for one client/player the coloured nametag / prefix / tab color is not viewable by other players, although I want that to happen.

    TL;DR Give a person a seperate scoreboard but put them in global teams, so everyone can see the coloured nametags.

    I need a push into the right direction, or a link of somesort.
    My code is rather styled to my core, but i'll write it in pseudo of what I have.

    Code:
    Scoreboard board; //Image it being initialized
    Player p; // ^
    
    /* Some method */
    Team team = board.registerNewTeam("etc");
    team.setPrefix(ChatColor.GOLD.toString());
    
    team.addPlayer(p);
    
    p.setScoreboard(board);
    
    /* Player p  can see his prefix, but other players cant.*/
    I'm not stupid, I know multiple scoreboards cannot be assigned together, but I know some servers were able to colour nametags (globally for everyone viewable) while having content-unique scoreboards per-player.

    I don't mind using packets (just link me xoxo)

    Thanks!
     
  2. Offline

    Unica

    Still no idea :/ Anyone?

    Publicly viewable Nametags with personal scoreboards?
     
Thread Status:
Not open for further replies.

Share This Page