.dev

Modules1 min read

Players & teams

Nametags, tab list, teams and nick hints.

players:1Tier A · Decorate

Good for

  • Ranks and levels on nametags
  • A tab list grouped by team or rank
  • Teammate markers and health through walls

Players & teams changes how other players appear to this player: nametags, the tab list and team markers.

Nametags

Java
teho.players().nametag(Nametag.of(target.getUniqueId())
        .prefix("§c[VIP] ")
        .above("§7Level 42")
        .below("§a❤ 20")
        .badgeItem("diamond")
        .build());

teho.players().clearNametags(target.getUniqueId());
MethodNotes
above(lines…), below(lines…)Extra lines, up to 4.
prefix(String), suffix(String)Around the name.
badge(Asset) / badgeItem(id)A PNG asset or an item next to the name.
hide(boolean)Hides the nametag.

Tab list

TabList.replace() sets the whole tab list, TabList.update() changes only what you pass, and TabList.reset() hands it back to vanilla.

Java
teho.players().tabList(TabList.replace()
        .header("§b§lSkyline", "§7play.skyline.gg")
        .footer("§7Online: " + online)
        .entry(TabList.Entry.of(playerId).display("§c[Admin] Notch").group("Staff").order(0))
        .entry(TabList.Entry.of(otherId).group("Players").ping("12 ms").order(10))
        .hidePing(false)
        .build());

teho.players().tabList(TabList.update().remove(leftId).build());
Entry methodNotes
display(String)The name shown.
group(String)Groups entries under a heading.
icon(Asset)A PNG icon.
ping(String)Replaces the ping bars with text.
order(int), color(argb)Sorting and colour.

On 1.7.10 the header and footer show in Teho's own tab list, since the game has none.

Teams

Java
teho.players().team(Team.builder("red")
        .name("Red")
        .color(0xFF5555)
        .members(redTeam)
        .markers(true)
        .throughWalls(true)
        .health(true)
        .compass(true)
        .build());

teho.players().removeTeams("red");

markers puts a marker over teammates, throughWalls keeps it visible through terrain, health shows their health and compass adds them to the HUD compass.

Nick hint

Java
teho.players().nick("Dinnerbone");

Tells the client the nick your server gave this player, so Teho's Nick Hider scrubs the server nick as well as the real name.