16 character limit on PacketPlayOutPlayerInfo

Discussion in 'Plugin Development' started by Doamax, Jan 25, 2014.

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

    Doamax

    Is there any way to bypass the character limit? 16 is fine for me, but when I try to edit the colors of the names on the tab list, it almost doubles, if not triples the amount of characters the name takes up on the tab list. If anyone knows a way to edit the color of strings without affecting the length please tell me because if I could get this to work it would be really cool.
     
  2. Offline

    RawCode

    custom client.
     
  3. Offline

    StrikeKiller

    use scoreboard prefixes :>
     
    Garris0n likes this.
  4. Offline

    GriffinPvP

    Well there is only one way to bypass the character limit, and it's using scoreboards. If you use this, however, the names above players' heads will be affected too. If you don't want that, you can always cut the player's name. Simple example of the scoreboards method (You need to call that method for every player whenever a player joins for it to be shown to all players):
    Code:java
    1. static Scoreboard scoreboard = Bukkit.getScoreboardManager().getNewScoreboard();
    2. public static void updateScoreboard(Player player) {
    3.  
    4. Team team = scoreboard.registerNewTeam("admin");
    5. team.setPrefix("Your Prefix Here");
    6.  
    7. for(Player online : Bukkit.getOnlinePlayers()) {
    8. if(online.hasPermission("yourplugin.admin")) {
    9. team.addPlayer(online);
    10. }
    11. }
    12.  
    13. player.setScoreboard(scoreboard);
    14. }


    This is the result:
    [​IMG]
     
  5. Offline

    bars96

    But if I want use double prefixes? I must use two teams: one for group prefixes and one for team prefixes.
    For example: [Group][Team]Player
    How to do this?
     
  6. Offline

    LordVakar

    bars96
    Er just combine them both into one?
     
  7. Offline

    bars96

    How? I have ~6 groups and 4 teams. So I must create 24 teams? :eek:
     
  8. Offline

    LordVakar

    bars96
    Just combine them both into one string?
     
  9. Offline

    bars96

    How I combine it if I can only set prefix for team? team.setPrefix("...");
    I've just use scoreboard teams and have 4 teams in it. But how to give them PEX group prefixes?
     
  10. Offline

    bars96

  11. Offline

    Garris0n

    sigh
     
    Dragonphase likes this.
Thread Status:
Not open for further replies.

Share This Page