mineplex Tab

Discussion in 'Plugin Development' started by Licio123, Jul 20, 2014.

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

    Licio123

    I cant rename player's name in tab (I mean when I reaname if player has a name greater then 14 it get a stack strece saying that the name cannot be greater than 16 even mineplex did and then name has a lenth of 15 for example). How they did that
     
  2. Offline

    LCastr0

    They use team prefixes.
     
    Habbolant likes this.
  3. Offline

    Licio123

    Can you give me a example?
     
  4. Offline

    LCastr0

    You know the scoreboards?
    They have a team API, where a team can have a color, a prefix and a suffix.
    This is also the way that Hypixel does to put the rank before the nametag above the playertag and the guild's tag after the name.
    Read a little bit more about Team/Scoreboards on bukkit here.
     
    Garris0n likes this.
  5. Offline

    Licio123

    Thx
     
  6. Offline

    LCastr0

    You're welcome :)
     
  7. Offline

    Licio123

    LCastr0 Dud I've trie, tried, and tried again but I realy cant do that that a look at my result code and plz tell me what is wrong
    Code:java
    1. Player pl = e.getPlayer();
    2.  
    3. ScoreboardManager manager = Bukkit.getScoreboardManager();
    4. Scoreboard board = manager.getNewScoreboard();
    5. Team admin = board.registerNewTeam("admin");
    6.  
    7. admin.setPrefix("ADMIN ");
    8.  
    9. admin.setDisplayName("ADMIN - dessa" + pl.getName());
    10. admin.setCanSeeFriendlyInvisibles(true);
    11. admin.setAllowFriendlyFire(false);
    12.  
    13. admin.addPlayer(pl);
     
  8. Offline

    LCastr0

    You don't need to set the display name, just the team prefix. Then, after setting the team prefix, add the player, without changing his display name
     
Thread Status:
Not open for further replies.

Share This Page