Skip to content

How to display name from nickname plugins

NEZNAMY edited this page Feb 27, 2023 · 25 revisions

Content

About

Nick plugins are divided into 2 types:

  • First type only provides a variable, which can be retrieved and displayed wherever you want. It doesn't affect anything by default, unless configured to do so.
  • Second type actually changes player's name, spawning a player entity with different username to others (possibly to the player who nicked as well). This breaks all name-bound functions.

Plugins that only provide a variable

Example plugins: CMI, Essentials

These plugins are fully compatible and you won't experience any issues. The only thing left is to configure TAB to display the nickname.
To do so, configure customtabname and customtagname properties and use nickname placeholder from your nickname plugin. If you want to use this for all groups, you can use _DEFAULT_ group keyword, which applies that property to all groups that don't define it. Example:
groups.yml

_DEFAULT_:
  customtabname: '%essentials_nickname%'
  customtagname: '%essentials_nickname%'

Another way is to use commands (/tab group _DEFAULT_ customtabname %essentials_nickname%).
You only need to find correct PlaceholderAPI placeholder from your plugin and use it.

customtagname doesn't work by default. It is a property introduced by Unlimited nametag mode, which you need to enable to make it work. Even then, keep in mind that you cannot see your own armor stands by default, so you will still see your original name, just others won't.

WARNING: Do NOT put nickname placeholder into tabprefix/tagprefix! You will end up with double names!

Plugins that actually change player's name

Example plugins: EazyNick

These plugins are a bit trickier. TAB attempts to detect nickname changes of players, however, it doesn't work if nick plugin changes UUID as well. In that case, TAB doesn't recognize such players in any way and doesn't format their name in tablist nor nametags. In that case, your nickname plugin must do it. This is, however, something you probably don't want. Because of that, make sure to disable UUID changing in configuration files of your nickname plugin (if needed).

After disabling UUID changing, TAB will recognize nickname changes correctly. It will format their names in tablist, as well as put them into teams for nametags & sorting. At this point you only need to configure customtabname, see above guide. You don't need to worry about customtagname, since the nickname plugin already changed that name.

Tips & Tricks

Tip 1 - Nickname prefix

By default, Essentials prefixes nicknames of players in chat using ~ symbol for nicked players. We can very easily replicate that with Conditional placeholders. First, create a new condition:

conditions:
  nick:
    conditions:
    - '%essentials_nickname%=%player%'
    yes: "%player%"              # If nickname = player name -> player is not nicked
    no: "~%essentials_nickname%" # If nickname != player name -> player is nicked

Then, use %condition:nick% in your customtabname & customtagname instead of the placeholder directly.

Clone this wiki locally