1.8.8 NametagEdit API Sorting usage

Discussion in 'Spigot Plugin Development' started by Lightcaster5, Jul 7, 2021.

  1. I've tried a lot to get sorting to work using the nametagedit api. The FakeTeam#addMember seems to do nothing at all. Here was another attempt that colored the names but didn't sort them:
    Code (Java):
    String rankColor;
    if (player.hasPermission("perm1")) {
        rankColor = "&1&c"; // red name, first priority
    } else if (player.hasPermission("perm2")) {
        rankColor = "&2&3"; // dark aqua name, second priority
    } else if (player.hasPermission("perm3")) {
        rankColor = "&3&4"; // dark red name, last priority
    } else {
        rankColor = "&9&7";

    String level = rankColor.substring(0, 2) + "&c[&6" + Cache.getLevel(player) + "&c] "; // uses the first 2 chars of rankColor for sorting

    NametagEdit.getApi().setPrefix(player, level + rankColor.substring(2)); // uses level and last 2 chars of rank color for actual name coloring

    I don't need a spoon but Id appreciate some directions I should take to achieve this
  2. Stop saying bump
    • Funny Funny x 1
  3. why? nobody has replied to it? im well within the bumping rules.
  4. Stop saying bump.
    • Funny Funny x 1
  6. My guess is that everyone reading this is unfamaliar with NametagEdit and its api (at least I am). I think your best option is to ask for support on NametagEdit's discusstion thread or to create a bug report.
    • Useful Useful x 1