Scoreboard text > 16 with colors?

Discussion in 'Plugin Development' started by Extremelyd1, Mar 7, 2014.

Thread Status:
Not open for further replies.
  1. Hi guys,
    I'm having a problem, I would like to make a scoreboard text with less then 16 characters, but it does count the chatcolor at the moment, is there any way to display it with color, but over 16 characters?
    Example:
    Code:java
    1. objective.getScore(Bukkit.getOfflinePlayer(ChatColor.RED + "H" + ChatColor.GREEN + "i" + ChatColor.GOLD + " t" + ChatColor.DARK_PURPLE + "h" + ChatColor.GRAY + "e" + ChatColor.BLUE + "r" + ChatColor.DARK_RED + "e"))

    It is disconnect people because the lenght is over 16 characters due to the colors... It should just say Hi there, with colors.
    How to fix this?
     
  2. Offline

    Garris0n

    The prefix and suffix of a team can each have 32 characters, bringing the maximum characters up to 80.
     
  3. Offline

    RainoBoy97

    Garris0n
    I believe it's still 16, if it hasn't changed :p
     
  4. Offline

    Garris0n

    What is 16? The prefix/suffix are 32.
     
  5. Offline

    RainoBoy97

    Garris0n
    I swear the suffix and prefix could only be 16 chars before, have it changed? Just checked the code, it is 32 :s
     
  6. Prefix and suffix?? You have to get the score of an offline player, right? So first you need to make a temporary team, give it a prefix and/or suffix and then add the offline player to it before you put him on the scoreboard, right?
     
  7. Offline

    jusjus112

    Extremelyd1
    Try:
    Code:java
    1. objective.getScore(Bukkit.getOfflinePlayer("§4H§2i§6t§1h§8e§cr§4e"))
     
  8. Offline

    Garris0n

    First of all that doesn't fix anything, and second it is the incorrect way to do it. What the OP is correct.

    Yes, that is correct. You should also "Tag" or "Quote" people so they are alerted of your response, otherwise they will often either not return to the thread or return long after you respond by chance (like me right now).
     
  9. Garris0n Thanks a lot!!! Also for the tag thingy, was already thinking why you wasn't responding :p
     
    Garris0n likes this.
Thread Status:
Not open for further replies.

Share This Page