Max tablist name length?

Discussion in 'Spigot Plugin Development' started by FreeWall, May 28, 2016.

  1. Hello, I'm a little bit confused about max name lenght in TAB list.
    I thought the max lenght is like 16 chars, but I can set name by player.setPlayerListName(String name) with much more lenght than 16 chars (even without any tablist plugin). How is that possible?

    Server spigot 1.9.2, tested in clients 1.9, 1.9.1, 1.9.2.
  2. The TAB creates more space for what is needed. One question though, are you trying to use the &k color code within that?
  3. The max length for the displayname above the players head is 16 chars. That limit has nothing to do with the tablist though.
    • Agree Agree x 2
  4. In the most of the TABlist plugins is 16 chars limit. When I tried to remove this limit, my minecraft client crashed with exception "io.netty.ha ndler.coeec.decoderException: The recieved String length is longer than maximum allowed (x > 16)". So why I cannot set longer names with other tablist plugins, but it is possible with pure bukkit setPlayerListName method.

    I found many of threads how to bypass 16 chars limit in tablist, but by default it just works with longer than 16 chars.

    I don't complain about this, I'm just confused :D

    BTW: i'm not trying to use &k color code
    #4 FreeWall, May 28, 2016
    Last edited: May 28, 2016
    • Winner Winner x 1
  5. One method is setting a prefix and suffix, that will allow the names to be 48 characters long.
    Another method would be to send a playerinfo packet.
  6. AFAIK the client doesn't care about the actual length of a team prefix or suffix, so you can simply send players a custom team packet with your long prefix and suffix.
  7. But why to sending team packets with longer prefix if you can set it with setPlayerListName as long as you want?
    • Agree Agree x 1
  8. You guys aren't even reading what @FreeWall is saying, so please read the following:
    using player.setPlayerListName(), you CAN set a name longer than 16 chars.

    How is it the case, since everybody on other threads are saying they are crashing?
    (see links posted in an earlier post:

    I just tested it, on Spigot 1.8.8, and it works, without using prefix or suffix:

    Was this 16 chars a bukkit limit that have been solved with Spigot? Has this changed since MC 1.8?

    I'm asking myself the same question than @FreeWall, as I always read everywhere else than long names in the tab list was making people crash... :)
    • Agree Agree x 2
    • Like Like x 1
  9. In 1.8 and above their is no 16 character limit for a player's name in the tab list. In 1.7 and below you will have to use team prefix and suffix to reach 48 characters.
    • Agree Agree x 4
    • Useful Useful x 2
  10. Bingo. Back when all the plugins/tutorials in question were created with the limit, they limited because a lot of server didnt upgrade to 1.8 because *insert bogus reason here*. So they simply limit their plugin to 16 characters so to be compatible with 1.7. You see the same thing with today's new plugins. Too many devs are limiting their plugins because server owners do not want to update their server for *insert bogus reason here*. This has been happening since at least the 1.2.x days when I started. It just wasnt as noticeable because breaking changes were extremely limited back then.
  11. The "bogus reason" is that 1.8+ pvp sucks.
  12. Pretty much yeah. We've been hearing the same excuses since 1.2.x or before, "they broke pvp"
  13. Thanks guys, that is a clear explanation :)