Перейти к содержимому
Mineforgian

CustomNameTags

This mod provides you with a way to customize your player's name tags completely server-side with no need for any client mods.

18K загрузок53 подписчиковMITfabric

Обновлён 4 июля 2026 г. · опубликован 28 ноября 2023 г.

  • Example of CustomNameTags

CustomNameTags

This mod provides you with a way to customize your player's name tags completely server-side with no need for any client mods.

nametags.png

Commands

You are able to do some basic actions from within the game with the /nametag command, this requires permission level 2 or if you are using a permissions mod you can have the permission "custom-nametags.commands.nametag".

/nametag create <identifier> <text>

This creates a nametag with a given identifier and text, this supports the placeholder api.

/nametag delete <identifier>

This deletes a given nametag with identifier.

/nametag reload

This reloads the config file.

Configuration

This mod allows a high level of customization, from the text being displayed, whether it is being displayed and who it can be displayed to.

All of this is configured using a json located in config/custom-nametags/config.json. The above image used the following configuration:

{
  "nametags": [
    {
      "id": "example:admin_name",
      "update_interval": -1,
      "literal": "[Admin] <rainbow>%player:displayname_visual%<rainbow> ",
      "observee_predicate": {
        "type": "operator",
        "operator": 4
      }
    },
    {
      "id": "example:name",
      "update_interval": -1,
      "literal": "[Player] %player:displayname_visual%",
      "observee_predicate": {
        "type": "negate",
        "value": {
          "type": "operator",
          "operator": 4
        }
      }
    },
    {
      "id": "example:held_item",
      "update_interval": 1,
      "literal": "Holding: <green>%player:equipment_slot mainhand%</green>",
      "observee_predicate": {
        "type": "negate",
        "value": {
          "type": "entity",
          "value": {
            "equipment": {
              "mainhand": {
                "items": [
                  "minecraft:air"
                ]
              }
            }
          }
        }
      }
    },
    {
      "id": "example:data",
      "update_interval": 1,
      "literal": "%player:health%♥ %player:hunger%🍖 %player:statistic minecraft:killed minecraft:player%⚔ %player:statistic minecraft:deaths%\uD83D\uDC80"
    }
  ]
}

Creating a Nametag

In the config json, there will be an array which contains all the nametags that will be displayed for your players. Each nametag is its own object.

Let's have a look at what makes up a nametag:

"id"

This is the identifier unique to your nametag, and follows this convention: "namespace:name".

"update_interval"

This is the interval at which the nametag will be updated, in ticks. Set to -1 if your nametag doesn't need to be updated.

"literal"

This is the text that will be displayed on your nametag. This supports the placeholder api, which means you can add contextual data.

For example "%player:displayname" which will insert the display name of the current player. For all the details reference the placeholder api.

"visible_radius", "hidden_radius"

These two settings specify a range where the nametag will be visible to other players.

Set these to a negative value to disable them.

For example, if you only wanted players in range from a 5.3 to 10.7 block radius to see each others nametags, you can set:

{
  // ...
  "hidden_radius": 5.3,
  "visible_radius": 10.7,
  // ...
}

"observee_predicate"

This is optional and doesn't need to be defined, but if defined will allow you to decide which players will have this given nametag.

For example, in the example, above only operators are given the "example:admin_name" nametag and only non-operators are given the "example:name" nametag.

This uses the predicate api; you can view the documentation for more details about what predicates you can define.

This mod also adds a couple custom predicates for convenience:

A UUID predicate, which matches a player's uuid:

{
  "type": "uuid",
  "uuid": "d4fca8c4-e083-4300-9a73-bf438847861c"
}

A username predicate, which matches a player's username:

{
  "type": "player_name",
  "name": "senseiwells"
}

"observer_predicate"

This is optional and doesn't need to be defined, but if defined will determine whether an observing player will be able to see this nametag.

This uses the predicate api; you can view the documentation for more details about what predicates you can define.

Caveats

There are some limitations of CustomNameTags, while for almost all the cases the nametags will behave as expected, there are inconsistencies with the custom nametags.

  • When players press F1 to hide their HUD player custom nametags will remain visible.
  • If the player is part of a team, their normal nametag will render.
    • This can be solved by hiding all nametags for the given team:
    • /team modify <team> nametagVisibility never

Версии

ВерсияКаналИграЗагрузчикиДатаСкачать
1.5.0+26.2Релиз26.2fabric4 июля 2026 г.Скачать (1.3 МБ)
1.4.0+26.2Релиз26.2fabric17 июня 2026 г.Скачать (1.3 МБ)
1.3.3+26.1Релиз26.1, 26.1.1, 26.1.2fabric29 мая 2026 г.Скачать (1.3 МБ)
1.3.2+26.1Релиз26.1, 26.1.1, 26.1.2fabric3 апреля 2026 г.Скачать (1.3 МБ)
1.3.1+26.1Релиз26.1fabric25 марта 2026 г.Скачать (1.3 МБ)
1.3.0+26.1Релиз26.1fabric25 марта 2026 г.Скачать (1.3 МБ)
1.2.2+1.21.11Релиз1.21.11fabric19 марта 2026 г.Скачать (1.4 МБ)
1.2.0+1.21.11Релиз1.21.11fabric18 декабря 2025 г.Скачать (1.2 МБ)
1.1.1+1.21.9Релиз1.21.9, 1.21.10fabric23 ноября 2025 г.Скачать (1.2 МБ)
1.1.0+1.21.9Релиз1.21.9, 1.21.10fabric4 октября 2025 г.Скачать (1.2 МБ)
0.3.6+1.21.1Релиз1.21.1fabric1 августа 2025 г.Скачать (279 КБ)
1.0.2+1.21.8Релиз1.21.8fabric19 июля 2025 г.Скачать (1.0 МБ)
1.0.1+1.21.6Релиз1.21.6, 1.21.7fabric10 июля 2025 г.Скачать (1.0 МБ)
1.0.0+1.21.6Релиз1.21.6, 1.21.7fabric23 июня 2025 г.Скачать (999 КБ)
0.4.3+1.21.5Релиз1.21.5fabric19 апреля 2025 г.Скачать (276 КБ)

Показаны последние 15 из 35 версий.

Ченджлог

1.5.0+26.2Релиз26.2 · 4 июля 2026 г.
  • Remove dependency on polymer
1.4.0+26.2Релиз26.2 · 17 июня 2026 г.
  • Update to 26.2
1.3.3+26.1Релиз26.1, 26.1.1, 26.1.2 · 29 мая 2026 г.
  • Fix a bug causing nametags to sometimes detach from players
1.3.2+26.1Релиз26.1, 26.1.1, 26.1.2 · 3 апреля 2026 г.
  • Support 26.1.x
1.3.1+26.1Релиз26.1 · 25 марта 2026 г.
  • Fix some datafixer issues
1.3.0+26.1Релиз26.1 · 25 марта 2026 г.
  • Update to 26.1
1.2.2+1.21.11Релиз1.21.11 · 19 марта 2026 г.
  • Update dependencies
  • Removed dependency on polymer
1.2.0+1.21.11Релиз1.21.11 · 18 декабря 2025 г.
  • Update to 1.21.11

Комментарии

Загружаем…