Subtitles

Overview

The LabyMod client can display a subtitle tag (similar through using the scoreboard) under a players name.

Requirements

Example code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
public void setSubtitle( UUID playerUUID, String value ) {
    // List of all subtitles
    JsonArray array = new JsonArray();

    // Add subtitle
    JsonObject subtitle = new JsonObject();
    subtitle.put( "uuid", playerUUID );
    if(value != null) // null = remove the subtitle
        subtitle.put( "value", value );
    array.add(subtitle);

    // Send to LabyMod using the API
    LabyModPlugin.getInstance().sendServerMessage( player, "account_subtitle", array );
}

Info

You can use Minecraft color codes in the string (Example: &c)