[1.8] Too long name in scoreboard

Discussion in 'Spigot Plugin Development' started by iTweakz, Jun 6, 2017.

Thread Status:
Not open for further replies.
  1. So I have 1v1 scoreboard where is opponent's name and if opponent's name is too long I will get this

    Capture.PNG



    Code (Text):
    prefix = color("Opponent:");
    sufix = color(" &f") + getRival(p).getName();
    Team l3 = board.registerNewTeam("l3");
    l3.addEntry(prefix);
    l3.setSuffix(sufix);
    sidebar.getScore(prefix).setScore(3);
     
  2. Trim the string to 13 and add ellipsis?
     
  3. A scoreboard Im pretty sure cannot exceed a length of 16, including colour characters.
    You may need to seperate your information onto seperate lines.
     
  4. Question, many plugins have somehow extended it to 32, how did they do that?
     
  5. I think they use prefixes and suffixes, as you did, Im not sure though. They may use packets.
     
  6. PACKETS, OFC, thank you.
     
  7. For more information, check this thread (seems to have a bunch of useful info on this topic).
     
    • Informative Informative x 1
Thread Status:
Not open for further replies.