CustomNameTags

Quick rating

CustomNameTags

No reviews yet

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

Mod Loaders
Fabric
Minecraft
26.2

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Unsupported
Server Required

About

Project Details

Type
Mod
License
MIT License
Latest Version
1.5.0+26.2
Authors

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

Modrinth ID

Resources

External Links

About

Description

icon.png?raw=true 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

Screenshots

Gallery

  • Example of CustomNameTags
    Example of CustomNameTags This image shows the capabilities of CustomNameTags, implementing nametags that can be applied to specific players.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

~18,000
Downloads
Last Updated
CurseForge
Modrinth
Created
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works